F
Filament3mo ago
Meap

Custom & display validation message

How can I customize the validation for a required field and display the error message below the input field? I've tried using rule and rules, but it's not working for me. Thanks for any help!
No description
Solution:
Oh, it prioritizes frontend validation. What I need to do is remove all ->required() and replace them with ->rules('required'). Thanks for the help!
Jump to solution
3 Replies
JJSanders
JJSanders3mo ago
Filament Daily
YouTube
Filament: How to Customize Validation Messages?
Answering a question in the YouTube comment.
Meap
MeapOP3mo ago
I mean displaying the validation message for the required rule instead of frontend validation, like in the image above. The video only provides guidance for cases like unique, max, min, and others, but not for my specific case.
Solution
Meap
Meap3mo ago
Oh, it prioritizes frontend validation. What I need to do is remove all ->required() and replace them with ->rules('required'). Thanks for the help!

Did you find this page helpful?