validate before requires confirmation

Hi, can we do validation before requires confirmation ?
2 Replies
DrByte
DrByte17mo ago
->afterStateUpdated(function (Forms\Contracts\HasForms $livewire, Forms\Components\TextInput $component) {
$livewire->validateOnly($component->getStatePath());
})
->afterStateUpdated(function (Forms\Contracts\HasForms $livewire, Forms\Components\TextInput $component) {
$livewire->validateOnly($component->getStatePath());
})
See: https://laraveldaily.com/post/filament-validate-one-form-field-live-before-submit and https://filamentphp.com/docs/3.x/forms/advanced#field-updates
Ricardo Sawir
Ricardo SawirOP17mo ago
It's a solution, but I was thinking to not use the live one.... simply just a button... when clicked it will need to requires confirmation... however, the current behaviour is it will show the requiresConfirmation, and then validate that.... which also doesnt dismiss the confirmation modal

Did you find this page helpful?