Closed maxuai closed 1 year ago
I would have a branch with a fix ready, but am am not allowed to push ;)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi @maxuai if you're still interested in adding this, please folk this project and open a pull request; I'd be happy to review.
node
version - 18.12.1celebrate
version - 15.0.1joi
version (vianpm ls --depth=0 | grep joi
) - 17.2.3My
joi
schema looks like this:`{
Here is an example value that is not working as expected:
(param: { name: true })
The issue I am having with
celebrate
is:When using
joi.alternatives
with objects and none of the alternatives matches the error message is too generic like"message": "\\"param\\" does not match any of the allowed types"
. What would be needed is to add thecontext
from the the error details to thevalidation
object in the error response.