Whether the value was dropped from some parent collection.
If this field contains a list of elements that are validated as part of its validation, their results are recorded here.
The value it was replaced by, if any.
The path of the field responsible for the failure.
If this field contains other fields that are validated as part of its validation, their results are recorded here.
The value that failed validation for this field.
If this field contains a list of elements that are validated as part of its validation, their results are recorded here.
The error message.
Options forwarded to the Error constructor.
Record whether a validation failure is unresolved. This reports as true if validation for this field or any hierarchically contained field is unresolved. A failure is unresolved if the value was invalid and there was no valid fallback value available.
Return this validation failure as an Error instance.
Generate a nested tree view of the error as an HTML string.
Copy the data of this DataModeValidationFailure to another one.
Retrieve a flattened object of all the properties that failed validation as part of this error.
const changes = {
"foo.bar": "validValue",
"foo.baz": "invalidValue"
};
try {
doc.validate(expandObject(changes));
} catch ( err ) {
const failures = err.getAllFailures();
if ( failures ) {
for ( const prop in failures ) delete changes[prop];
doc.validate(expandObject(changes));
}
}
Retrieve the leaf node failure that caused this, or a specific sub-failure via a path.
Optionalkey: stringThe property key to the failure.
Log the validation error as a table.
Return the base properties of this failure, omitting any nested failures.
Represent the DataModelValidationFailure as a string.
A class responsible for recording information about a validation failure.