Add action modal error manually

Hello, I have this action:
ExcelImportAction::make('import_trials')
->beforeImport(function (array $data, Component $livewire, ExcelImportAction $excelImportAction) {

$livewire->addError('import_trials.upload', 'foo');

$this->halt();

})
ExcelImportAction::make('import_trials')
->beforeImport(function (array $data, Component $livewire, ExcelImportAction $excelImportAction) {

$livewire->addError('import_trials.upload', 'foo');

$this->halt();

})
What I would like to do is add an error to the upload field within this action. I have tried adding one using $livewire->addError('upload', 'foo') with various paths: import_trials.upload, import_trials.0.upload, import_trails.data.upload. Any ideas? For some extra context I am using https://filamentphp.com/plugins/eightynine-excel-import.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?