FieldValidateProps
Defined in: packages/core/src/fields/baseTypes.ts:89
Arguments passed to a field’s validate() function.
Every field type overrides TValue with its own resolved value type
(string for text, number for number, etc.) and TField with its
own resolved field config type (TextField, NumberField, etc.) via its
own xValidator factory in fields/<type>/validator.ts — these defaults
of unknown only show up if you reference the type directly.
Type Param
Section titled “Type Param”TDataModel
Your project’s generated Convex DataModel.
Defaults to GenericDataModel; fieldValidator accepts it as an
explicit type argument so ctx is fully typed.
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends VexResourceSlug = VexResourceSlug
The collection this field belongs to. Defaults
to the full CollectionSlug union (every collection’s document) when
unspecified. fieldValidator infers this from its slug argument — see
there for the recommended way to get a narrow doc.
TValue
Section titled “TValue”TValue = unknown
TField
Section titled “TField”TField = unknown
This field’s own resolved config type (e.g.
TextField). Defaults to unknown; each field type’s xValidator
factory pins it to that field’s own type, so field is typed without
an explicit type argument.
Properties
Section titled “Properties”ctx:
VexMutationCtx
Defined in: packages/core/src/fields/baseTypes.ts:105
The project’s own Convex mutation context, from the vex generate
augmentation — no type parameter, because a project has one data model.
doc:
DocumentByResourceSlug<TCollectionSlug>
Defined in: packages/core/src/fields/baseTypes.ts:97
field:
TField
Defined in: packages/core/src/fields/baseTypes.ts:100
This field’s own resolved config — the same object defineCollection stored under this key.
fieldKey
Section titled “fieldKey”fieldKey:
string
Defined in: packages/core/src/fields/baseTypes.ts:98
value:
TValue
Defined in: packages/core/src/fields/baseTypes.ts:96
vex:
VexCallbackApi
Defined in: packages/core/src/fields/baseTypes.ts:111
Read-only VexCMS API: flat globals, populated relationships, access-aware
reads. Reach for ctx above for a single indexed probe, and for vex when
the document shape or the access rules matter.