Model form disappears on Validation Error #183
Unanswered
alvins-dev
asked this question in
Q&A
Replies: 3 comments 4 replies
-
This often happens if you have multiple root elements. Livewire only allows one root element to be present. So try wrapping the content of your component in a div. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have the same issue, I added validate on update and the rules variable. I think that there is something in JS that removes the modal at all on clicking the submit button. |
Beta Was this translation helpful? Give feedback.
4 replies
-
I had same issue, removing comment of the root element fixed the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
@PhiloNL Thank you for the package.
I am stuck with the validation part when working with the modal.
After I click




submit
, Livewire is returning validation error when there is.serverMemo: {errors: {user.email: ["The email field is required."]}
@error('user.email') <p {{ $message }} </p> @enderror
But when the modal is re-rendered, it removes the whole form-content leaving just LivewireUIModal HTML wrap.
How can I display the validation errors within Modal?
(1)
(2)
(3)
(4)
Beta Was this translation helpful? Give feedback.
All reactions