Skip to content

Interface: AsyncValidationOptions

Extends

Properties

PropertyTypeDescriptionOverridesInherited from
abortEarly?booleanwhen true, stops validation on the first error, otherwise returns all the errors found. Default true-ValidationOptions.abortEarly
allowUnknown?booleanwhen true, allows object to contain unknown keys which are ignored. Default false-ValidationOptions.allowUnknown
artifacts?booleanwhen true, artifacts are returned alongside the value (i.e. { value, artifacts }) Default falseValidationOptions.artifacts-
cache?booleanwhen true, schema caching is enabled (for schemas with explicit caching rules). Default false-ValidationOptions.cache
context?ValidationContextprovides an external data set to be used in references-ValidationOptions.context
convert?booleanwhen true, attempts to cast values to the required types (e.g. a string to a number). Default true-ValidationOptions.convert
dateFormat?"string" | "date" | "iso" | "time" | "utc"sets the string format used when converting dates to strings in error messages and casting. Default 'iso'-ValidationOptions.dateFormat
debug?booleanwhen 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-ValidationOptions.debug
errors?ErrorFormattingOptionserror formatting settings.-ValidationOptions.errors
externals?booleanif 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-ValidationOptions.externals
messages?LanguageMessagesoverrides individual error messages. Defaults to no override ({}). Messages use the same rules as templates. Variables in double braces are HTML escaped if the option errors.escapeHtml is set to true. Default {}-ValidationOptions.messages
noDefaults?booleanwhen true, do not apply default values. Default false-ValidationOptions.noDefaults
nonEnumerables?booleanwhen true, inputs are shallow cloned to include non-enumerable properties. Default false-ValidationOptions.nonEnumerables
presence?PresenceModesets the default presence requirements. Supported modes: 'optional', 'required', and 'forbidden'. Default 'optional'-ValidationOptions.presence
skipFunctions?booleanwhen true, ignores unknown keys with a function value. Default false-ValidationOptions.skipFunctions
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-ValidationOptions.stripUnknown
warnings?booleanwhen true, warnings are returned alongside the value (i.e. { value, warning }). Default false--