Expand description
CRUDUI validation rule registry (VALIDATION-RULES, JS rules/* parity).
Each rule is a function over a RuleContext returning the error message
(Some) or None (pass). The rules mirror the JS reference engine
(packages/validator/ts/src/rules/*) function-for-function so the shared
4-language fixture (tests/fixtures/validate/cases.json) holds bit-for-bit:
same skip-on-empty behaviour, same default messages with {0}/{1}
substitution, same loose comparisons.
The call site is the CRUDUI validate slot; the rule semantics are the JS rule registry re-expressed in Rust.
Structs§
- Rule
Context - The per-rule invocation context handed to a rule function.
Functions§
- get_
rule - Look up a registered rule by name. Returns
Nonefor any other name, which fails the load withUNKNOWN_RULE. - get_
value_ by_ path - Read a value at concrete path segments (JS
getValueByPath). Missing → null. - is_
condition_ expression - JS
isConditionExpression: a string that looks like a condition. - resolve_
field_ reference - Resolve a field-reference expression to its value (JS
resolveFieldReference):.x/..xrelatives with a row as one level, a dotted path from the root and a bare name resolved as.name.