Constructs a new instance of a data transfer object with the given input.
The input data to assign to this data transfer object.
Pending validation promise, if any.
Whether this object has already been validated.
Cached validation errors from previous validation.
Runs all synchronous validators on this object.
To run asynchronous validators as well, use .getValidationErrorsAsync()
.
Options to pass to the validator system.
Runs all synchronous and asynchronous validators on this object.
Always returns a promise. To validate synchronously, use .getValidationErrors()
.
Options to pass to the validator system.
Returns a JSON friendly object containing only data properties of this object (ie, no validation functions).
Automatically used by JSON.stringify()
.
Validates this object (sync validators only), and returns its plain data if validations pass.
Otherwise, throws an error or runs the appropriate handler set with setValidationErrorHandler()
.
To run both sync and async validators, use .validateAsync()
.
Options to pass to the validator system.
Validates this object asynchronously, and resolves to its plain data if validations pass.
Otherwise, rejects with an error or runs the appropriate handler set with setValidationErrorHandler()
.
To validate synchronously, use .validate()
.
Options to pass to the validator system.
Generated using TypeDoc
Creates a new data transfer object which will validate and reshape its input data based on the validators of its own properties. Must be extended, should not be instantiated on its own.