A validation combines a validation rule with specific options to be used during field validation. This represents a configured validation ready for execution.
Think of this type as "ValidationRule" + "runtime options"
const validation: Validation<{ length: number }> = { rule: minLengthRule, options: { length: 5 }} Copy
const validation: Validation<{ length: number }> = { rule: minLengthRule, options: { length: 5 }}
The type of options for the validation rule
Optional
Runtime options to pass to the validator function. These options configure the specific behavior of the validation.
The validation rule to execute.
A validation combines a validation rule with specific options to be used during field validation. This represents a configured validation ready for execution.
Think of this type as "ValidationRule" + "runtime options"
Example