Select Field Required Wrong Validation
Guys, I'm trying to use Filament Form inside livewire component but I'm facing some errors related to form validation.
I made a select field with some values but when selecting and submitting the form, is returned "The field is required.".
I have the same problem using DatePicker with "native->false", but removed it, with Select I'm not understanding why.
I'm getting data using
Solution:Jump to solution
Omg Leandro !!
I had forgotten about the 'fill' in the mount... actually, I thought it wasn't necessary. Thank you very much, it worked like a charm...
4 Replies
It works if I remove searchable from select.
Doesn't make sense.
Found this bug.
https://github.com/filamentphp/filament/issues/7940
GitHub
Repeater bug when have searchable select field inside · Issue #7940...
Package filament/filament Package Version v3.0.27 Laravel Version v10.19.0 Livewire Version v3.0.0-beta10 PHP Version PHP 8.1.10 Problem description This bug only happens when we have searchable se...
Did you follow this section? https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component
Did you create the mount method with
$this->form->fill()
?
Are you using statePath
?Solution
Omg Leandro !!
I had forgotten about the 'fill' in the mount... actually, I thought it wasn't necessary. Thank you very much, it worked like a charm