Tanuki
Tanuki
FFilament
Created by Tanuki on 9/21/2023 in #❓┊help
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 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;
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.');
}

});
3 replies
FFilament
Created by Tanuki on 5/4/2023 in #❓┊help
RelationManagerTable access $records from headeractions
Is there a way to access all of the records within the relation manager from the action itself ?
->headerActions([
Tables\Actions\Action::make('lorem')
->action(fn ($records) => dump($records)),
])
->headerActions([
Tables\Actions\Action::make('lorem')
->action(fn ($records) => dump($records)),
])
7 replies
FFilament
Created by Tanuki on 3/14/2023 in #❓┊help
KeyValue is missing the associative part on edit
8 replies