warhost.
warhost.
FFilament
Created by warhost. on 4/7/2025 in #❓┊help
Action Modal closes itself when receiving Validation Errors via setErrorBag
You are right. It doesn't show the errors because the wire keys are very different to what's used in the validator:
wire:model="mountedActionsData.0.email"
wire:model="mountedActionsData.0.email"
6 replies
FFilament
Created by warhost. on 4/7/2025 in #❓┊help
Action Modal closes itself when receiving Validation Errors via setErrorBag
Ah, it closes because the exception is caught, if it's not caught it stays open. However it still doesn't show the errors under the respective fields 😦
->action(function (array $data): void {
try {
app(CreatesInquiry::class)->create($data);
} catch (ValidationException $e) {
$this->setErrorBag($e->errors());

throw $e;
}
})
->action(function (array $data): void {
try {
app(CreatesInquiry::class)->create($data);
} catch (ValidationException $e) {
$this->setErrorBag($e->errors());

throw $e;
}
})
6 replies