Support for locale/custom validation error msgs in Password validation rule #37686
Unanswered
koushik355
asked this question in
Ideas
Replies: 1 comment
-
Hi there ✋🏻 ! This validation uses the translation strings as keys that are stored as JSON files in the For example, if your application has a Japanese translation, you should create a {
"The :attribute must contain at least one letter.": "また、:attribute には少なくとも1文字が含まれていなければなりません。"
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I wanted to use the
Password
rule. However, it lacks locale support/customizing the validation error msg.If I've something like this
Password::min(8)->letters()
I can only customize the
min
validation error msg from theresources/en/validation.php
or from themessages
method of theFormRequest
itself.For other validation like
mixed case, letters
I can't give the validation error message in another language apart from English which makes it unusable for multi-language apps.I tried certain ways in the
messages
method of theFormRequest
with something like thisHowever, it didn't work. Next, I checked the

Password Rule class
itself and I saw that the English validation message is hardcoded 😞Can we please have support for customizing the error messages so that we can include our message? It would be awesome for multi-language applications. In my current application, I can't use it since I need to show the message in Japanese as well.
Let me know if I'm missing anything. Would appreciate any input on this. Thank you guys.
Beta Was this translation helpful? Give feedback.
All reactions