Interface: ValidationRegistry
API / @xmachines/play-dom / ValidationRegistry
Defined in: @xmachines/json-render-dom
Registry of validated fields for one rendered tree.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
clear | public | (path) => void | Forget a field’s recorded state; the registration itself survives. | - |
customFunctions | readonly | Record<string, ValidationFunction> | Custom validation functions available to every check. | - |
fieldStates | readonly | Record<string, FieldValidationState> | Validation state by field state path. | - |
registerField | public | (path, config) => void | Register (or update) a field’s validation config. Called by component implementations during render, normally via ctx.validation. Registrations are reference-counted per path: two elements bound to the same state path each hold one, so one of them going away does not un-validate the other. | - |
releaseField | public | (path) => void | Drop one reference to a field’s registration, keeping its recorded state. The registration itself goes away once the last reference is released. This is what the render context’s per-element cleanup calls: an element instance releases its registrations when it unmounts or before it re-renders, and fieldStates survives — matching the framework ValidationProvider, whose field states outlive a re-render. | - |
touch | public | (path) => void | Mark a field as interacted with, without validating it. | - |
unregisterField | public | (path) => void | Drop a field’s registration entirely, references and recorded state. | - |
validate | public | (path, config?) => ValidationResult | Validate one field against the live store snapshot and record the result. Uses the field’s registered config unless one is passed explicitly. | - |
validateAll | public | () => boolean | Validate every registered field. Returns true when all are valid. | - |