Validate not triggering
Hi , I’m facing an issue where submitting the “Create ITRF” modal results in an internal server error whenever a required field (like
Here's a simplified version of my setup:
The problem seems to be that form validation isn’t triggering the
I’d appreciate any guidance on:
item_name) is left empty.Here's a simplified version of my setup:
- In the modal footer actions, I'm using:
- And inside the handler:
The problem seems to be that form validation isn’t triggering the
handleItrfStageOneAction() is executed, so the request goes straight to the database and fails on NOT NULL constraints.I’d appreciate any guidance on:
- Why the validation might be skipped in this context.
- Whether there’s a better way to trigger validation before the action logic runs.
- How to make Filament show inline field errors rather than crashing with SQL exceptions.
Solution
workaround
i am using
i am using
->after(fn (Action $action) => $action->cancelParentActions()) so that the modal not getting closed when the user submit empty fields or if there's any fields errors.