Skip to content

Variable: Field

Examples / @xmachines/play-dom-demo / Field

const Field: ComponentFn<AuthCatalog, "Field">;

Defined in: packages/play-dom/examples/demo/src/components/Field.ts:15

Field — labelled input with two-way $bindState binding and declarative validation checks.

ctx.validation.registerField registers the bound state path with the DOM renderer’s validation registry so the validateForm built-in sees it (the incremental renderer releases the registration when the element unmounts). Error DISPLAY deliberately reads props.formErrors — the result validateForm wrote to state — so every renderer surfaces errors at the same moment: after submit.