FilamentF
Filament2y ago
Marc

How to make a rule "in" of a multiple select

I have the following code:
Select::make('middlewares')
    ->translateLabel()
    ->required()
    ->multiple()
    ->default(['web'])
    ->options([
        'web' => 'web',
        'auth' => 'auth',
        'guest' => 'guest',
        'signed' => 'signed'
    ])->in('web,auth,guest,signed'),

When I submit the form I get the error:
The middlewares field is not in the list of allowed values.

In Laravel, to validate an array, you use middlewares.*, but I don't know how to do it in filament
Was this page helpful?