numberValidator
numberValidator<
TCollectionSlug>(slug,fn):FieldValidate<TCollectionSlug,number>
Defined in: packages/core/src/fields/number/validator.ts:57
Types a number() field’s validate() against a real collection and
DataModel, with value fixed to number.
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends string
Parameters
Section titled “Parameters”TCollectionSlug
The owning collection’s slug, used only to infer TCollectionSlug.
FieldValidate<TCollectionSlug, number, NumberField<string, { }>>
The validate callback, checked against the collection’s real document shape and value type.
Returns
Section titled “Returns”FieldValidate<TCollectionSlug, number>
The same function, re-typed to the field’s loose public validate signature.