-
Notifications
You must be signed in to change notification settings - Fork 45
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
stop contact form process if there's an error in the controller #78
Conversation
aeyoll
commented
May 28, 2024
•
edited
Loading
edited
Questions | Answers |
---|---|
Description? | Prevent the contact form from being sent if there's an error in the controller. It allows a module to add additional form validation |
Type? | improvement |
BC breaks? | no |
Deprecations? | no |
Fixed ticket? | - |
How to test? | - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this. In my opinion, it's pretty annoying when you submit the form, it tells you an error, you fix it and it tells you another error. 🤷♂️
Your description matches how it works at the moment: if there are two errors in the form, only the first one is displayed. My PR displays all errors + display possible errors emitted by a module using a hook. |
@aeyoll Yes, you are right, I should see eye doctor. 😄😄😄 |
LGTM too, thanks @aeyoll ;) |
Hello @aeyoll Could you provide a Thanks! |
friendly reminder @aeyoll |
Hello @florine2623, You can test it by installing this module: https://github.com/aeyoll/pow-captcha-for-prestashop. It's a custom captcha module, it doesn't matter if its configured or not, since we want to test the failing case. It just need to be enabled. Before the update of "contactform", you won't see the captcha error message. With this branch of "contactform", you'll see the captcha error message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @aeyoll ,
Thanks for the details.
I tested the standard case.
All errors are displayed at once, instead of after each check.
It is QA ✅ !
Thanks!