Skip to content

The Open Standard for Generative UI

1.6 KB
Raw Blame

state

These cases protect a client from losing or misplacing state: undeclared $names, two-way bindings, which form a field writes to, and which values pass validation. They cover language.md section 5. The binding and form cases use interactions.json, and the validation case uses validation.json instead of a program.

Case What it checks Spec
001-store-auto-declare An undeclared $name is declared with null, so the Text shows "anon", and the store holds $v and $name. 5.1
002-binding-two-way (+ interactions) $query passed to the bindable Input.value is a binding, and typing "late" writes it to the store. 5.2
003-form-scope (+ interactions) An Input inside Form("contact", ...): the @ToAssistant event carries formName: "contact" and the field under that form. 5.3, 6.3
004-form-page-level (+ interactions) An Input outside any form writes page-level state: the event has no formName and the field at the top level of formState. 5.3, 6.3
005-validation-rules Pass or fail for each rule (required, email, url, numeric, minLength, maxLength, min, max, pattern), including that every rule but required skips empty values and that "12abc" is numeric. 5.4