Class: Validator<TypeScriptType, IsOptional, FieldPaths>
values.Validator
A validator for a Convex value.
This should be constructed using the validator builder, v.
This class encapsulates:
- The TypeScript type of this value.
- Whether this field should be optional if it's included in an object.
- The TypeScript type for the set of index field paths that can be used to build indexes on this value.
- A JSON representation of the validator.
Type parameters
Name | Type |
---|---|
TypeScriptType | TypeScriptType |
IsOptional | extends boolean = false |
FieldPaths | extends string = never |
Properties
type
• Readonly
type: TypeScriptType
Defined in
isOptional
• Readonly
isOptional: IsOptional
Defined in
fieldPaths
• Readonly
fieldPaths: FieldPaths
Defined in
_isValidator
• Readonly
_isValidator: undefined
Defined in
optional
• Readonly
optional: boolean