Interface: BaseValidationOptions
Extended by
Properties
| Property | Type | Description |
|---|---|---|
abortEarly? | boolean | when true, stops validation on the first error, otherwise returns all the errors found. Default true |
allowUnknown? | boolean | when true, allows object to contain unknown keys which are ignored. Default false |
artifacts? | boolean | when true, return artifacts alongside the value. Default false |
cache? | boolean | when true, schema caching is enabled (for schemas with explicit caching rules). Default false |
context? | ValidationContext | provides an external data set to be used in references |
convert? | boolean | when true, attempts to cast values to the required types (e.g. a string to a number). Default true |
dateFormat? | "string" | "date" | "iso" | "time" | "utc" | sets the string format used when converting dates to strings in error messages and casting. Default 'iso' |
debug? | boolean | when true, valid results and throw errors are decorated with a debug property which includes an array of the validation steps used to generate the returned result. Default false |
errors? | ErrorFormattingOptions | error formatting settings. |
externals? | boolean | if false, the external rules set with any.external() are ignored, which is required to ignore any external validations in synchronous mode (or an exception is thrown). Default true |
noDefaults? | boolean | when true, do not apply default values. Default false |
nonEnumerables? | boolean | when true, inputs are shallow cloned to include non-enumerable properties. Default false |
presence? | PresenceMode | sets the default presence requirements. Supported modes: 'optional', 'required', and 'forbidden'. Default 'optional' |
skipFunctions? | boolean | when true, ignores unknown keys with a function value. Default false |
stripUnknown? | | boolean | { arrays?: boolean; objects?: boolean; } | remove unknown elements from objects and arrays. - when true, all unknown elements will be removed - when an object: - objects - set to true to remove unknown keys from objects Default false |