© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Tanuki

BeforeValidation addError on Wizard Step with repeater

Hi,

I'm using the Filament\Forms seperated from admin panel.

I'm trying to add additional verification on a step component. This step component contains a repeater
leaves
leaves
that has items in it.

I'm trying to add an error on the step. I don't know what I'm doing wrong.
I'd appreciate if anyone could help.

Also my form data is stored in
public array $data;
public array $data;


Forms\Components\Wizard\Step::make('absence(s)')

 ->beforeValidation(function (array $state, CreateLeaveForm $livewire, Forms\Components\Wizard\Step $component) {


foreach ($state['leaves'] as $key => $leave) {
    $livewire->addError("leaves.$key.from_date", 'An error message here.');
}

});
Forms\Components\Wizard\Step::make('absence(s)')

 ->beforeValidation(function (array $state, CreateLeaveForm $livewire, Forms\Components\Wizard\Step $component) {


foreach ($state['leaves'] as $key => $leave) {
    $livewire->addError("leaves.$key.from_date", 'An error message here.');
}

});
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Wizard, stop from going to next step within `beforeValidation` or `afterValidation`
FilamentFFilament / ❓┊help
3y ago
wizard step create record on first step
FilamentFFilament / ❓┊help
3y ago
Repeater not working within Tab or Wizard\Step
FilamentFFilament / ❓┊help
2y ago
Get Current Step on Wizard
FilamentFFilament / ❓┊help
3y ago