FilamentF
Filament15mo ago
skyrowl

CheckboxList ->in() validation not working

Hey,

Using what's on the docs I have the following code with different values:
CheckboxList::make('technologies')
    ->options([
        'tailwind' => 'Tailwind CSS',
        'alpine' => 'Alpine.js',
        'laravel' => 'Laravel',
        'livewire' => 'Laravel Livewire',
        'heroicons' => 'SVG icons',
    ])
    ->in(fn (CheckboxList $component): array => array_keys($component->getEnabledOptions()))


When using the in validation rule and calling getState the field returns an error "is invalid"
When removing this rule I have no errors and every other fields are working as expected
Worth noting that I have radios with the same code and those are working as expected

Thx for any help!
Was this page helpful?