-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codebugBug or defectBug or defect
Milestone
Description
I don't know very well if this issue should be posted in the hapi or joi repos...
Given the following payload schema:
joi.object().keys({
a: joi.object().keys({
c: joi.number()
}),
b: joi.object().keys({
c: joi.number()
})
})And the given value:
{
"a": {},
"b": {}
}The error message is:
{
"statusCode": 400,
"error": "Bad Request",
"message": "c is required. c is required",
"validation": {
"source": "payload",
"keys": ["a.c", "b.c"]
}
}As you can see, the message has an ambiguous meaning. This should be: "a.c is required. b.c is required".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codebugBug or defectBug or defect