We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When a form isn't valid, Turbo expects a HTTP 422 code to be returned. Otherwise form errors aren't handled correctly.
This bundle always returns a HTTP 200 code regardless of form errors.
Submit an invalid form should return a HTTP 422 when given data isn't valid.
Using Hotwire Turbo and this bundle, submit a form with invalid value and see the problem: no error displayed and no redirection.
Add a kernel.response event listener, and return a http 422 response if an invalid form is returned. I'm working on a PR.
kernel.response
The text was updated successfully, but these errors were encountered:
feat: invalid form returns http 422
43d829c
Fixes sulu#383
a393b9d
Successfully merging a pull request may close this issue.
When a form isn't valid, Turbo expects a HTTP 422 code to be returned.
Otherwise form errors aren't handled correctly.
Actual Behavior
This bundle always returns a HTTP 200 code regardless of form errors.
Expected Behavior
Submit an invalid form should return a HTTP 422 when given data isn't valid.
Steps to Reproduce
Using Hotwire Turbo and this bundle, submit a form with invalid value and see the problem: no error displayed and no redirection.
Possible Solutions
Add a
kernel.response
event listener, and return a http 422 response if an invalid form is returned.I'm working on a PR.
The text was updated successfully, but these errors were encountered: