© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•6mo ago•
2 replies
Grégoire

Validating multi-select fields

Hey,

How would you properly validate the options for a multi-select field in Livewire? While it works well without the
multiple
multiple
attribute, the validation doesn't seem to be applied when it is added. Adding
in
in
doesn't seem to help either. What am I missing?

Select::make('languages')
    ->multiple()
    ->options([
        'en' => 'English',
        'es' => 'Spanish',
        'fr' => 'French',
    ])
Select::make('languages')
    ->multiple()
    ->options([
        'en' => 'English',
        'es' => 'Spanish',
        'fr' => 'French',
    ])


livewire(AppSettings::class)
    ->fillForm([
        'languages' => ['klingon'],
    ])
    ->call('save')
    ->assertHasFormErrors(['languages']); // Failed asserting that false is true.
livewire(AppSettings::class)
    ->fillForm([
        'languages' => ['klingon'],
    ])
    ->call('save')
    ->assertHasFormErrors(['languages']); // Failed asserting that false is true.
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

multi select
FilamentFFilament / ❓┊help
3y ago
Multi-select
FilamentFFilament / ❓┊help
3y ago
Dynamic Select Fields
FilamentFFilament / ❓┊help
3y ago