conditionally required validation

This doesn't seem to be working:
Select::make('time_entry_category_id')
->required(fn() => !$this->isRunning)
Select::make('time_entry_category_id')
->required(fn() => !$this->isRunning)
I also want to be able to conditionally require if a field is visible, and this also doesn't seem to be working:
Select::make('time_entry_category_id')
->required(fn() => !$this->isRunning)
->visible(fn() => !$this->isRunning)
Select::make('time_entry_category_id')
->required(fn() => !$this->isRunning)
->visible(fn() => !$this->isRunning)
I've tried replacing the variables with just hard coded true/false values in case the variable wasn't getting set up right, but that's not working either.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server