I am trying out Livewire's instant authentication which seems to work fine for other inputs but array fields. Wondering how I could show the error messages for array inputs. Blade code
<input type="tel" pattern="[0-9]+" minlength="6" wire:model="contact_phone.{{$index}}"
class="form-control {{ $errors->has('contact_phone.*') ? ' is-invalid' : '' }} " required>
<div>@error('contact_phone') <span class="error text-danger small">{{ $message }}</span> @enderror</div>
Validation
public function updated($field)
{
$this->validateOnly($field, [
'contact_phone' => 'required|array|min:1',
'contact_phone.*' => 'required|string|min:3',
]);
}
Following this doc