Optionaloptions: Partial<FieldOptions> & DateFieldOptionsOptionalvalidations: Validation<any>[]Define the input type of the schema for TypeScript inference
The output value type of the field after validation. The property points to a type only and not the real value.
Type marker for camelCase output type inference
OptionaldataThe validation to use for validating the schema data type. Using a data type validator guards custom rules to only run when the data type validation passes.
StaticrulesAvailable VineDate rules
The property must be implemented for "unionOfTypes"
The subtype of the literal schema field
Define a method to parse the input value. The method is invoked before any validation and hence you must perform type-checking to know the value you are working it.
Adds a validation rule to the schema's validation chain. Rules are executed in the order they are added.
The validation rule or rule builder to add
This schema instance for method chaining
Enable/disable bail mode for this field. In bail mode, field validations stop after the first error.
Whether to enable bail mode
This schema instance for method chaining
Mark the field under validation as optional. An optional field allows both null and undefined values.
Mark the field under validation to be null. The null value will be written to the output as well.
If optional and nullable are used together, then both undefined
and null values will be allowed.
Apply transform on the final validated value. The transform method may convert the value to any new datatype.
Compiles the literal schema type into a compiler node. This method transforms the schema definition into a format that the validation compiler can process.
Name of the property being compiled
Reference store for the compiler
Parser options including camelCase conversion
Compiled literal node with subtype information
Checks if the value is of date type. The method must be implemented for "unionOfTypes"
The equals rule compares the input value to be same as the expected value.
By default, the comparions of day, month and years are performed.
Optionaloptions: DateEqualsOptionsThe after rule compares the input value to be after the expected value.
By default, the comparions of day, month and years are performed.
Optionaloptions: DateEqualsOptionsThe after or equal rule compares the input value to be after or equal to the expected value.
By default, the comparions of day, month and years are performed.
Optionaloptions: DateEqualsOptionsThe before rule compares the input value to be before the expected value.
By default, the comparions of day, month and years are performed.
Optionaloptions: DateEqualsOptionsThe before rule compares the input value to be before the expected value.
By default, the comparions of day, month and years are performed.
Optionaloptions: DateEqualsOptionsThe sameAs rule expects the input value to be same as the value of the other field.
By default, the comparions of day, month and years are performed
Optionaloptions: DateEqualsOptionsThe notSameAs rule expects the input value to be different from the other field's value
By default, the comparions of day, month and years are performed
Optionaloptions: DateEqualsOptionsThe afterField rule expects the input value to be after the other field's value.
By default, the comparions of day, month and years are performed
Optionaloptions: DateEqualsOptionsThe afterOrSameAs rule expects the input value to be after or equal to the other field's value.
By default, the comparions of day, month and years are performed
Optionaloptions: DateEqualsOptionsThe beforeField rule expects the input value to be before the other field's value.
By default, the comparions of day, month and years are performed
Optionaloptions: DateEqualsOptionsThe beforeOrSameAs rule expects the input value to be before or same as the other field's value.
By default, the comparions of day, month and years are performed
Optionaloptions: DateEqualsOptionsThe weekend rule ensures the date falls on a weekend
The weekday rule ensures the date falls on a weekday
Clones the VineDate schema type. The applied options and validations are copied to the new instance
VineDate represents a Date object created by parsing a string or number value as a date.