Skip to content

Remove custom "Required" form validation message#6782

Merged
aduth merged 3 commits intomainfrom
aduth-form-validation-required
Aug 19, 2022
Merged

Remove custom "Required" form validation message#6782
aduth merged 3 commits intomainfrom
aduth-form-validation-required

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Aug 18, 2022

Why:

  • They are inconsistent with desired error feedback UX, which should be implemented as design system error messages via ValidatedFieldComponent.
  • Improves performance of critical path by reducing JavaScript (and locale data) bundle size.
    • For context, the Sign In page loads locale data which includes only this one string for required fields (screenshot).
  • Contributes toward removal of form-validation pack, to be removed between this and Use self-contained component for SimpleForm submit buttons #6771
  • Reduces complexity, where this validation intervention has often conflicted with other validation (specifically, see data-form-validation-message handling and related context at Form Validation: Limit custom validation reset to own validation #5631)

Implementation Notes:

While I did update the Sign In page for consistency, there may be other places in the application which still use native form validation, and in those cases the required field feedback will revert from the customized "This field is required" to the browser default (e.g. "Please fill in this field" in Chrome). I think we should aim to update these fields to the standard error feedback display than to continue propping up this non-standard error message customization.

Screenshots:

Before After
image Screen Shot 2022-08-18 at 9 03 24 AM

aduth added 2 commits August 18, 2022 08:59
**Why**:

- They are inconsistent with desired error feedback UX, which should be implemented as design system error messages via ValidatedFieldComponent.
- Improves performance of critical path by reducing JavaScript (and locale data) bundle size.
  - For context, the Sign In page loads locale data which includes only this one string for required fields.
- Contributes toward removal of form-validation pack, to be removed between this and #6771

changelog: Improvements, Form Validation, Use consistent error message feedback for form validation
**Why**: For consistent error feedback
@aduth aduth merged commit 0b4caed into main Aug 19, 2022
@aduth aduth deleted the aduth-form-validation-required branch August 19, 2022 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants