Form validation

On registration or login screen (or when using "Filamament Form Builder" standalone on for frontend forms - outside of "Filament Admin Panel") error validation seems to be done by browser itself and not error styling is applied. How can this be changed?
15 Replies
Daniel
DanielOP2y ago
I've noticed that because in case of a required DatePicker I don't get any error notification/highlighting/styling when trying to submit without an value entered.
Daniel
DanielOP2y ago
For my frontend I've done the installation like described here: https://filamentphp.com/docs/2.x/forms/installation
Filament
Installation - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.
LeandroFerreira
any console error?
Daniel
DanielOP2y ago
no it‘s just the browser validating the required - no css error classes get applied
LeandroFerreira
Can you share the code please?
Daniel
DanielOP2y ago
js? php?
LeandroFerreira
php If you remove ->required() and add ->rule('required'), what happens when you submit the form?
Daniel
DanielOP2y ago
when making the suggested change the field isn't required any more i share the same fields within the admin panel to have same logic when i want to collect i.e. personal data like "first_name"
Daniel
DanielOP2y ago
in backend:
Daniel
DanielOP2y ago
in frontend:
Daniel
DanielOP2y ago
Daniel
DanielOP2y ago
solved 🙏
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
toeknee
toeknee11mo ago
Open a new topic, just use Required with closure
Want results from more Discord servers?
Add your server