Prohibits validation rule
I have a form with two fields - only one should be filled, not both. This would use Laravel’s
prohibits
(https://laravel.com/docs/10.x/validation#rule-prohibits) normally but that is not supported.
I found an old post on here saying to do this:
->prohibited(fn (Closure $get): bool => filled($get('field1')))
But when I try this I get the following error:
App\Filament\Pages\Tenancy\RegisterCompany::App\Filament\Pages\Tenancy\{closure}(): Argument #1 ($get) must be of type Closure, Filament\Forms\Get given, called in /app/vendor/filament/support/src/Concerns/EvaluatesClosures.php on line 35
Here’s my form - either the select should be selected or the input filled, not both:
0 Replies