The type of the property values
The [name, value] entry validator or the property template; omitted or disabled validators accept
the corresponding properties
Optionalwhole: Modal<Validator<Record<string, T>>>The validator applied to the record as a whole; omit or disable to constrain the properties alone
A validator reporting the violations the object incurs, property-wise and as a whole
Constrains an object.
Applies property-wise constraints in either of the two modes of the
isObjectguard of@metreeca/core:[name, value]pair, so it may constrain property names as well as their values;Templates are closed by default: properties not named by the template are rejected. Including a key wildcard entry opens the template, applying its validator to every property not explicitly named, pass to admit them unconstrained.
Property violations are reported keyed by property name, the wildcard ones under the name of the property they were reported for. A second validator constrains the record as a whole, covering constraints spanning several properties, so both levels are stated in one call. Whole-record violations lead the report as bare messages, ahead of the record keying the property ones.