Additional validations on the `action` method for Standalone action
When using a standalone action, is it possible to do additional form validations inside the
action()
method. The reason why I need to do this is because some of the validations are based on the argument passed to the Action (https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component#passing-action-arguments) on the blade file.5 Replies
because the
arguments
are not available inside the rules()
method of the component
basically want to do the following based on the blade code below
I've never tried in this context but I think you may be able to use Livewire's
validate()
with a set of custom rules:
@Abishek you found a fix for this?
the
validate()
method worked, but I do show a small modal with the errors to be more intutive as the number of error messages on my UI is more.Are you willing to share some code of it? I have a similar use case.
I use the modal to upload an Excel file which I process with Maatwerk/Laravel-Excel
I want to show the errors triggered by that import