Translating DTOs messages #605
Answered
by
NiloufarPadkan
NiloufarPadkan
asked this question in
Q&A
-
I wanna translate validation errors using nestjs-18n . Here is an example of my login DTO which username and password are required.
when user does not enter username receives :
but i wanna customize this error and get
|
Beta Was this translation helpful? Give feedback.
Answered by
NiloufarPadkan
Feb 23, 2024
Replies: 1 comment 2 replies
-
https://nestjs-i18n.com/guides/dto_validation/global-validation follow along |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this link does not have any information about what i said but it has a link to what helped me finding answer
here :
If you want a different output, create your own interceptor! For an example look at the I18nValidationExceptionFilter.
i edited this file in my node modules and then patch it using patch-package in order to have my changes in different systems