The failure that triggered this error or an error message
Optional...params: any[]Additional Error constructor parameters
Generate a nested tree view of the error as an HTML string.
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 root failure that caused this error, or a specific sub-failure via a path.
Optionalpath: stringThe property path to the failure.
Log the validation error as a table.
A specialised Error to indicate a model validation failure.