Expand description
CRUDUI validation entry point (SPEC §2 pipeline).
Wires the three CRUDUI passes in order (G5 compose first → §3 traversal → §2 G1 value evaluation):
- compose —
compose_spec/compose_propertiesexpand$ref/$patchinto a single spec. An unresolved composition returnsErr(ComposeLoadError)HERE (a LOAD failure, NOTvalid:false) — an unresolved$refnever yieldsvalid:true. - validate —
Validatortraverses the composed spec and runs thevalidateslot (conditional rule values evaluated by the CRUDUI expression engine, then handed to the rule registry).
The compose pass reuses the existing crate::compose module and the
expression engine reuses crate::expr. Nothing re-implements them.
Re-exports§
pub use errors::FormInputError;pub use errors::ValidateError;pub use validator::ValidationError;pub use validator::ValidationResult;pub use validator::Validator;
Modules§
- errors
- Validation failures that produce no validation result.
- group_
source - Choices from a repeated group (schema.md, “Choices from a repeated group”).
- numeric
- Numbers (validation rules, “Values”): numeric text, numeric values and exact step multiples.
- rules
- CRUDUI validation rule registry (VALIDATION-RULES, JS
rules/*parity). - validator
- CRUDUI form validator (SPEC §2 G5→§3→§2 G1, JS
Validatorparity). - visibility
- Visibility (validation rules, “Evaluation”):
design.showresolved against the data in the field’s row context.
Structs§
- Validate
Options - Options for a CRUDUI validation run.
Functions§
- validate
- Validate
dataagainst a CRUDUI spec. The spec may carry$ref/$patch; they are expanded first via the compose pass. An unresolved composition or a rule parameter outside the validation-rule definitions returnsErr(ValidateError::Load)and data with the wrong shape returnsErr(ValidateError::Input); neither produces a validation result.