FilamentF
Filament3y ago
PANC

Change form validation on custom action click.

Hey everyone.

Like the title says. I have a form that has some validations but i want to bypass them if i click on a custom action button.

EX: I have a simple form with some required fields and if i click "submit" it should check the validation but if i click "Save as draft" only the username is required.

How can i do this?
Solution
Was able to solve this on the custom "createDraft" function using the livewire $this->validate and passing only the new rules.

Thank you 🙂
Was this page helpful?