-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
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
Override extension language #1753
Comments
@Marsup can you please reply? |
I recognize this is a bug, extensions are considering language as local options (which always override global options) which prevents language overriding. I'm not sure I'll be able to fix it quickly so unless you can maybe you'll have better luck post-processing the errors from the details array which is I think a better way of doing i18n, there are npm modules doing it for you I think. |
@Marsup can you tell me , when you can fix it? |
@Marsup reply please |
Not the best way to get a response, honestly. I can assure you he has not forgotten this, and does keep up with issues and bugs; so if you haven't gotten a response in 2 days it's probably because he is busy with his full-time job (which is not Joi maintenance). |
@WesTyler OK , sorry |
Even though this is technically a breaking change, I'm going to put it out there as a patch because it was a misguided implementation. |
@Marsup When you release 15.0.1? |
It is now. |
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
According to https://github.com/hapijs/joi/blob/master/API.md#validatevalue-schema-options-callback we can pass options.language to validate to override languages
I have a multi-language application , I successfully override Joi core languages such as
object.max
But I cannot override extension languages
The text was updated successfully, but these errors were encountered: