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

Only one error is displayed at a time on validation error - The error is displayed at the top of the form instead of next to the field #107

Open
1 task done
MaxwellGarceau opened this issue Jan 2, 2025 · 0 comments
Labels
type:enhancement New feature or request.
Milestone

Comments

@MaxwellGarceau
Copy link
Collaborator

MaxwellGarceau commented Jan 2, 2025

Is your enhancement related to a problem? Please describe.

When multiple fields have validation errors, the form only displays one of those errors. Furthermore, the error is displayed at the top of the form instead of underneath the field where the error occurred.

only-one-error-message-is-displayed-at-a-time.mov

Designs

Revamp the FE error message system to output multiple error messages underneath the fields they are attached to. This could be done in conjunction with #100 using more or less the same proposed solution.

I'm guessing that the majority of the validation is done on the Mailchimp API. If this is the case, we can probably still overhaul the validation by populating one of the global variables ($_POST) with the error messages and writing conditional checks to display those messages where appropriate.

Describe alternatives you've considered

Since the field that the error message belongs to is included in the message the bare minimum is met. However, we should at least retrieve all of the error messages from the API and display them to the user.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@MaxwellGarceau MaxwellGarceau added type:enhancement New feature or request. validation and removed validation labels Jan 2, 2025
@jeffpaul jeffpaul added this to the 1.8.0 milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants