We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Label declaration on Joi objects shadows the name of attributes that fails to be validated in the error message.
Example:
Joi.object({color: Joi.string().regex(/#[0-9a-fA-F]{6}/)}).label("test");
If I post a payload with a color field wrongly formatted I get:
{ "statusCode": 400, "error": "Bad Request", "message": "child \"test\" fails because [\"test\" with value \"string\" fails to match the required pattern: /^[0-9A-Fa-f]{6}$/]", "validation": { "source": "payload", "keys": [ "color" ] } }
The text was updated successfully, but these errors were encountered:
8982a05
Fix propagation of label on objects/arrays
5e274a3
Fixes #803.
dd78079
Thanks for the report, it's fixed and published.
Sorry, something went wrong.
Marsup
No branches or pull requests
Label declaration on Joi objects shadows the name of attributes that fails to be validated in the error message.
Example:
Joi.object({color: Joi.string().regex(/#[0-9a-fA-F]{6}/)}).label("test");
If I post a payload with a color field wrongly formatted I get:
The text was updated successfully, but these errors were encountered: