Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nusoft opened this issue Mar 17, 2021 · 0 comments · Fixed by dubcanada/aire#1
Open

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

nusoft opened this issue Mar 17, 2021 · 0 comments · Fixed by dubcanada/aire#1
Labels
bug Something isn't working

Comments

@nusoft
Copy link

nusoft commented Mar 17, 2021

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.

@nusoft nusoft added the bug Something isn't working label Mar 17, 2021
dubcanada added a commit to dubcanada/aire that referenced this issue Jul 29, 2021
Use the shared view to get validation errors from livewire and session store.
dubcanada added a commit to dubcanada/aire that referenced this issue Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant