Synchronously deserialize (and validate) a value
Asynchronously deserialize (and validate) a value
Returns a new schema that requires that this schema is satisfied but that the specified schema cannot be satisfied.
Optional
options: { Optional
expectedSynchronously serialize (and validate) a value
Asynchronously serialize (and validate) a value
Sets (replaces) the description metadata for this schema and returns the same schema
Optional
description: stringSets (replaces) the example metadata for this schema and returns the same schema
Optional
example: stringSets (replaces) the preferred validation mode for this schema and returns the same schema.
The lesser level of the preferred validation mode, which will be applied recursively depending on the depth
parameter / unless
further re-specified, and the specified validation mode, will be used, where the order is none < soft < hard
.
The preferred validation mode for this schema Special Values:
"initial"
- use the initially specified validation mode for the current operation (ex. the validation
field of the options
parameter to deserialize
)."inherit"
- use the closet applicable mode from an ancestor schema level.Makes a string representation of this schema, mostly for debugging
Synchronously validate a value
Asynchronously validate a value
Generated using TypeDoc
Returns a new schema that requires that either this schema is satisfied or that the value is
null
.