Skip to content

bytesValidator

bytesValidator<TCollectionSlug>(slug, fn): FieldValidate<TCollectionSlug, ArrayBuffer>

Defined in: packages/core/src/fields/bytes/validator.ts:44

Types a bytes() field’s validate() against a real collection and DataModel, with value fixed to ArrayBuffer — the wrapper fieldValidator for this field type.

TCollectionSlug extends string

TCollectionSlug

The owning collection’s slug, used only to infer TCollectionSlug.

FieldValidate<TCollectionSlug, ArrayBuffer, BytesField<string, BaseFieldMeta>>

The validate callback, checked against the collection’s real document shape and value type.

FieldValidate<TCollectionSlug, ArrayBuffer>

The same function, re-typed to the field’s loose public validate signature.

fieldValidator