F
Filament•15mo ago
Nils Domin

How to disable browser validation in Filament forms?

I have a 'required()' rule for all the input fields. However, the first input field always will be validated by the browser, not server-side. The input fields after are correctly validated.
No description
No description
No description
8 Replies
LeandroFerreira
LeandroFerreira•15mo ago
->rules(['required']) ?
Nils Domin
Nils DominOP•15mo ago
Thanks, but still the same problem.
LeandroFerreira
LeandroFerreira•15mo ago
Did you remove ->required() ?
Nils Domin
Nils DominOP•15mo ago
Ah no, I forgot. Now it works as expected. Thanks! 🙂
Get bĂĽsy
Get büsy•12mo ago
Nice, it works but it hide the required input star. Do you know how to show it?
LeandroFerreira
LeandroFerreira•12mo ago
->markAsRequired(true) ?
Get bĂĽsy
Get büsy•12mo ago
I tried but that does not work. Maybe some bug in FIlament. (btw. true is default value)
BuddhaNature
BuddhaNature•11mo ago
I am looking for the same answer. It looks like ->markAsRequired() modifies ->required() or does not recognize that 'required' exists when in a ->rules() method. Probably the latter.
Want results from more Discord servers?
Add your server