© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
12 replies
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'),
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.
The middlewares field is not in the list of allowed values.


In Laravel, to validate an array, you use
middlewares.*
middlewares.*
, but I don't know how to do it in filament
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Select->multiple() in SelectColumn?
FilamentFFilament / ❓┊help
12mo ago
Select::make multiple, searchable
FilamentFFilament / ❓┊help
3y ago
Selecting all values in Select::multiple
FilamentFFilament / ❓┊help
3y ago
How can I make a multiple selection in a single column?
FilamentFFilament / ❓┊help
3y ago