Error
An object that defines a validation failure.
object
Wild card
It is common to group errors by the property that triggered the error state. In some cases, it possible to group errors where one error is not identified with a property.
var errors = [
{ message: 'is required'},
{
message: 'must be a number',
related: 'age'
}
];
In this situation, the first object in the array is not identified with a property.
This item will have a related
assumed to be *
. It possible for this error item
to be grouped with other "orphaned" errors.
var errors = [
{
message: 'is required',
related: '*'
}, {
message: 'must be a number',
related: 'age'
}
];