-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
When a entity is not valid, the error property is:
{ property1: { errors: [ 'Required undefined `property1` was not specified in `FakeEntity`.' ] } }But the error message is not friendly to application user.
I suggest to add a new param in validation:
class FakeEntity extends Speck {
static SCHEMA = {
property1: {
validator: Proptypes.number.isRequired,
errorMessage: 'Property1 must be a number'
}
}
}So, the error message will be:
{ property1: { errors: ['Property1 must be a number' ] } }Metadata
Metadata
Assignees
Labels
No labels