Skip to content

No error class & message appear when submitting using Livewire #75

@nusoft

Description

@nusoft

Describe the bug
When submitting a form using Livewire, Aire does not apply error classes and does not show error messages within the associated input's group. It only shows the {{ Aire::summary() }}

Have you published the Aire config file?
Yes

Have you added custom Aire views?
No

What version does this affect?

  • Laravel Version: 8.12
  • Aire Version: 2.4

To Reproduce
Steps to reproduce the behavior:

  1. Create a Livewire component and add validation rules to the component class and a save() method
  2. Add a form to the component view and add to the form setAttribute('wire:submit.prevent', 'save')
  3. Add an input field with setAttribute('wire:model.defer', 'title')
  4. Submit the form without a value in the field

Expected behavior
Expecting an error class in the input group and an error message.

Additional context
When I remove the setAttribute('wire:submit.prevent', 'save') from the form, and handle the request in my Controller, the error class and message work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions