How to customize validation messages globally?
See original GitHub issueInstead of passing custom message to each decorator.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:40
- Comments:44 (5 by maintainers)
Top Results From Across the Web
How to customize yup validation messages? - Stack Overflow
You could do it by using setLocale function from yup like this: import * as Yup from 'yup'; Yup.setLocale({ mixed: { required: 'Required ......
Read more >Custom Error Messages - express-validator
You can build dynamic validation messages by providing functions anywhere a validation message is supported. This is specially useful if you use a...
Read more >Validation | Vue Formulate ⚡️ The easiest way to build forms ...
# Custom validation rules ... Like with validation messages, rules can be added globally or per-field. Rules are just simple functions that are...
Read more >Overriding the Message — FluentValidation documentation
Note that custom error messages can contain placeholders for special values such as {PropertyName} - which will be replaced in this example with...
Read more >Validation | NestJS - A progressive Node.js framework
Read more about custom validators, error messages, and available decorators as provided by the class-validator package here. Support us. Nest is an MIT-licensed ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Seriously, this functionality hasn’t still gone out? I wonder why nestJs chooses this library…
It would be really nice and allow for i18n of the error messages. Really useful while reusing validation classes on backend (english) and on frontend (multilanguage) 😉