arrayValidator
arrayValidator<
TCollectionSlug,TArrayType>(slug,fn):FieldValidate<TCollectionSlug,TArrayType[]>
Defined in: packages/core/src/fields/array/validator.ts:63
Types an array() field’s validate() against a real collection and
DataModel, with value fixed to TArrayType[].
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends string
TArrayType
Section titled “TArrayType”TArrayType extends ArrayType = string
Parameters
Section titled “Parameters”TCollectionSlug
The owning collection’s slug, used only to infer TCollectionSlug.
FieldValidate<TCollectionSlug, TArrayType[], ArrayField<string, TArrayType, BaseFieldMeta>>
The validate callback, checked against the collection’s real document shape and value type.
Returns
Section titled “Returns”FieldValidate<TCollectionSlug, TArrayType[]>
The same function, re-typed to the field’s loose public validate signature.