The Schema class defines the structure and rules for validating data using
a Validator. It ingests the input schema list and then reorders and
validates the schema according to the Registry. The resulting @schema
property defines the validation behaviour and data matching.
Each element of the input list represents a field with named rules
(e.g., 'type', 'required', 'min_val') that are checked against the
schema rule registry. Cross rules (e.g., 'min_val_larger_than_max_val',
where 'min_val' < 'max_val') are also evaluated when all constituent
rules pass individually. See the Registry class for details.
The schema is re-evaluated upon any change to the schema properties,
with the @valid property indicating whether the schema is valid
(all rules pass) or invalid (any rule fails). If invalid, when passed
to a Validator the validation will fail immediately.
For full details see the vignettes on
builtin rules,
data validation, and
adding custom rules.