-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugBug or defectBug or defect
Milestone
Description
Hi, I come from hapijs/hapi#2431
Please check https://gist.github.com/sarhugo/6ec6929a98697cfd8a1a
The problem that I'm having is that using route validation on Hapi I'm not having a way to get the object key for a failed assert validation.
I'm aware of the label() method to override the key returned on error but if I make multiple assert validations then the label becomes generic as "value".
Maybe adding some options argument to assert so I can indicate the key returned for each validation?
Here I made another gist to reproduce using only Joi
https://gist.github.com/sarhugo/2b47490ae615a9da9a36
Regards
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect