The element type of the array
The element validator or positional tuple template; omitted or disabled validators accept the corresponding elements
Optionalarray: Modal<Validator<readonly T[]>>The validator applied to the array as a whole; omit or disable to constrain the elements alone
A validator reporting the violations the array incurs, element-wise and as a whole
Constrains an array.
Applies element-wise constraints in either of the two modes of the
isArrayguard of@metreeca/core:Element violations are reported keyed by element position (
"2"). A second validator constrains the array as a whole, covering cardinality, membership, and the like, so both levels are stated in one call. Whole-array violations lead the report as bare messages, ahead of the record keying the element ones.