TagsInput Validation on Custom Livewire Component

Hi, I'm using a TagsInput on a custom livewire component. The form works fine and I followed https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component The issue I have it is the validation seems never be displayed.
public function form(Form $form): Form
{
return $form
->schema([
TagsInput::make('id_numbers')
->hiddenLabel()
->placeholder('Enter ID Numbers')
->hiddenOn('create')
->nestedRecursiveRules([
'int',
])
->live(),
])
->statePath('data');
}
public function form(Form $form): Form
{
return $form
->schema([
TagsInput::make('id_numbers')
->hiddenLabel()
->placeholder('Enter ID Numbers')
->hiddenOn('create')
->nestedRecursiveRules([
'int',
])
->live(),
])
->statePath('data');
}
If I try and add ABC as a tag, I can see the error in the Livewire response has an error
{
"errors\":{\"data.id_numbers.0\":[\"The data.id_numbers.0 must be an integer.\"]}
}
{
"errors\":{\"data.id_numbers.0\":[\"The data.id_numbers.0 must be an integer.\"]}
}
but it never gets displayed on the frontend? Not sure if I am missing something?
Solution:
This has now been fixed in core
Jump to solution
1 Reply
Solution
Craig Potter
Craig Potter14mo ago
This has now been fixed in core
Want results from more Discord servers?
Add your server