Validation messages not working on custom page?
Hi,
I have custom page
Each field has custom error messages like
but submitting form shows the default Laravel messages.
8 Replies
Anyone? 😦
Hi,
There is no rule named
accepted
: are you using a custom rule?There is - for e.g. by using ->accepted() (from vendor/filament/forms/src/Components/Concerns/CanBeAccepted.php) but it can be any validation message/rule and it not works as well.
Are you using a
statePath
?
Are you doing this?
Yes, I'm using statePath('data')
I'm doing this:
For this page all rules I'm using through filament - like accepted() required() or maxLength()
did you do
$this->form->fill()
in the mount method?Oh boy, I was sure it's when I want populate form with model data... I'm so dumb. Thank you so much.
It’s not. That’s why it’s mentioned at the start of the docs 🙈