Open rainbowMeh opened 4 months ago
This is considered to be a validation option, not a schema option, so you should probably pass it to your validation calls instead of applying it to all your schemas.
Could you please give me an example how to do it? Cause I dont find any docs or article to input the intl message data into the validation option
Thank you !
Just like you did, but in the validation options, not the schema:
await schema.validateAsync({ ... }, { messages: joiMessage, errors: { language: 'id' } })
Runtime
node.js
Runtime version
v20.15.1
Module version
^17.13.3
Used with
No response
Any other relevant information
No response
How can we help?
I cannot use any of custom error message when using external to validate data
Here is Joi utils
\ When the entity error, the error message is this
"\"subIndustry\" contains an invalid value"
\ How to use the custom error message?