Expand description
Form-field validation driver.
Recomputes the is_valid flag on every entity carrying a Validation component and mirrors
the result into PropertyStore under the valid:<lumen-id> global key.
Supported matchers:
required: trimmed text must be non-empty; the slider value must be> 0; the toggle must bechecked.pattern: content must contain the configured literal substring, or match a named shape when the pattern starts withshape:(seematches_pattern).min/max: numeric range applied to slider values and to input text when it parses as a number.
Structs§
- Validation
Plugin - Plugin: registers
apply_validationinTickStage::Systemsso validation runs after author-side tick logic has settled.
Functions§
- apply_
validation - Walk every entity whose validation input changed this tick. Pick the
most relevant content source (TextContent -> slider -> toggle), apply
the rules, write the result back to
Validation::is_valid, and mirror intoPropertyStore[Global("valid:<id>")]when the entity has a stableLumenId. - evaluate
- Pure validation function - handy for tests and any author-side
script-bridge that wants to validate a value without spawning an
entity. Pass the relevant slot for the entity’s kind; the other
slots stay
None. - matches_
pattern - Apply a
patternrule to one value.