adobe / adobe/aem-core-wcm-components
AEMaaCS | Core Components - Error Identification / Error Suggestion - Form Elements
- Dominant language
- Java
- Stars
- 795
- Forks
- 775
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 8
Description
A selection of form components have been added to a test page, form fields set as “mandatory”. On submit, there is no visual cue to indicate to the user that there is an error. Checking the html code before and after the submit are identical - no differences.
**Current Behavior**
Error notifications are not triggered at the same time. If a form is made up of multiple mandatory fields and these are not entered, only the first incorrect field is flagged. The user must correct that field and resubmit before alerted to the next incorrect field. It’s only when a user corrects that field and resubmits that they are alerted to the next incorrect field, and so on.
it doesn’t indicate the “fields in error” – it only indicates the first one.
Secondly, whilst we can configure the error message, we cannot ensure it is specific to the error – we can only validate if a field has been entered or not.
Finally, only text inputs can be validated. This means that users could feasibly not enter data to selects, checkboxes or radio buttons, and would not be notified of this.
**Expected behavior/code**
On submission, all fields in errors should be marked
Error message should be as specific as possible
Possibilities to validate other fields than text input.
**Environment**
- AAEMasCS version 9-2024 2024.9.17964.20240924T170544Z
- Core Components version: AEM Core WCM Components
/core/wcm/components/form/container/v2/container
/core/wcm/components/form/button/v2/button
/core/wcm/components/form/text/v2/text
**Possible Solution**
**Additional context / Screenshots**
Contributor guide
Research direction
Start by reproducing the mandatory-field submission behavior in the listed form container, button, and text components: /core/wcm/components/form/container/v2/container, /core/wcm/components/form/button/v2/button, and /core/wcm/components/form/text/v2/text. Compare validation for text inputs, selects, checkboxes, and radio buttons. Done means all invalid fields are identified on submission, messages are specific where possible, and non-text fields can be validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100