-
Notifications
You must be signed in to change notification settings - Fork 331
Closed
Description
Continuation of discussion from #440 (comment)
The custom message feature allows a user to specify a custom validation message based on the type of validation. However, this is limited in that you can only have one message per type.
It would be nice if it was possible to specify this at each attribute, for example
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"firstName": {
"type": "string",
"description": "The person's first name.",
"message": {
"type": "Invalid type, should be string"}
},
"foo": {
"type": "array",
"maxItems": 3,
"message": {
"maxItems" : "MaxItem must be 3 only",
"type" : "Invalid type, should be array"
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels