-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Custom error message not working #48866
Comments
Hi there, Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels: However, this issue will not be locked and everyone is still free to discuss solutions to your problem! Thanks. |
@driesvints Thank you for the feedback but I believe this is a bug. |
@begueradj try setting |
Thank you. I am looking for something similar to what the documentation says about non built-in methods. |
@begueradj can you try this? $messages = [
'password' => ['letters' => 'Your keyboard should have letters.'],
]; |
I just tried what you suggested: no message is displayed in this case. |
I don't know what's up unfortunately.. appreciating any help with this. |
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
@begueradj It seems |
@begueradj It appears that
|
One can argue that the |
Thank you @rcknr What you said should be added to the official documentation then. Otherwise, implicitly, according to the official documentation, we could customize error messages of all validation rules. |
@begueradj My changes were released in 10.33. |
You did a wonderful work @rcknr |
Laravel Version
10.x
PHP Version
8.1
Database Driver & Version
MySql 8, Ubuntu 20.04
Description
I am using Laravel Breeze and I want to display a custom error message related to the password input during user registration.
But it is always the default error message that gets displayed.
Steps To Reproduce
In app/Http/Controllers/Auth/RegisteredUserController.php", I want to set a custom error message (please read the 2 comments):
From this source file and the documentation, what I did should work.
The text was updated successfully, but these errors were encountered: