Configuration options for field validation behavior. These options control how individual fields are processed during validation.
const options: FieldOptions = { allowNull: false, bail: true, isOptional: false, parse: trimParser} Copy
const options: FieldOptions = { allowNull: false, bail: true, isOptional: false, parse: trimParser}
Whether null values are allowed for this field
Whether to stop validation on first error
Whether the field is optional (can be undefined)
Optional
Optional parser to preprocess the input value
Configuration options for field validation behavior. These options control how individual fields are processed during validation.
Example