question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to customize validation messages globally?

See original GitHub issue

Instead of passing custom message to each decorator.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:40
  • Comments:44 (5 by maintainers)

github_iconTop GitHub Comments

47reactions
rafaelbriercommented, Feb 7, 2021

Seriously, this functionality hasn’t still gone out? I wonder why nestJs chooses this library…

35reactions
MichalLytekcommented, Feb 25, 2018

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) 😉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found