when true, allows object to contain unknown keys which are ignored.
when true, schema caching is enabled (for schemas with explicit caching rules).
provides an external data set to be used in references
when true, attempts to cast values to the required types (e.g. a string to a number).
sets the string format used when converting dates to strings in error messages and casting.
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.
error formatting settings.
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).
overrides individual error messages. Defaults to no override ({}
).
Messages use the same rules as templates.
Variables in double braces {{var}}
are HTML escaped if the option errors.escapeHtml
is set to true.
when true, do not apply default values.
when true, inputs are shallow cloned to include non-enumerables properties.
sets the default presence requirements. Supported modes: 'optional', 'required', and 'forbidden'.
when true, ignores unknown keys with a function value.
remove unknown elements from objects and arrays.
when true, warnings are returned alongside the value (i.e. { value, warning }
).
when true, stops validation on the first error, otherwise returns all the errors found.
true