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

Error Messages for Constraints #6707

Closed
10 tasks
yuriy-fix opened this issue Aug 27, 2024 · 0 comments
Closed
10 tasks

Error Messages for Constraints #6707

yuriy-fix opened this issue Aug 27, 2024 · 0 comments
Labels
acceptance criteria used for the acceptance criteria checklist DS Design System feature (e.g. component) V24.5

Comments

@yuriy-fix
Copy link
Contributor

Description

Enable developers to specify custom error messages for field component constraints (e.g., pattern, minimum length) using the i18n. These messages should be displayed when validation is run. Additionally, these messages should also be utilized by the Vaadin Binder to provide clear and consistent feedback to users during form validation.

Use cases

As a developer
I want to specify custom error messages for field component constraints using the i18n mechanism
So that I can ensure consistent and localized feedback for users when constraints are violated, including when using Vaadin Binder

As an end user filling out a form
I want to see clear and helpful error messages when I make a mistake
So that I can understand what went wrong and how to correct it quickly

Acceptance criteria

  • Custom error messages can be set for constraints using explicit methods on the field's i18n. For example, datePicker.getI18n().setBadInputErrorMessage("Date has incorrect format").
  • Custom error messages provided via i18n are displayed during validation when constraints are violated.
  • Error messages provided through i18n are respected by Vaadin Binder during validation.

General criteria

  • APIs reviewed
  • Design
  • Performance
  • UX/DX tests in Alpha
  • Documentation:
  • How to test?
  • Limitations:
  • When used with Binder, the required constraint should be set on the Binder itself using asRequired, and the error message should be provided through it. The message set on the field's i18n won't be used in this case.
@yuriy-fix yuriy-fix added acceptance criteria used for the acceptance criteria checklist DS Design System feature (e.g. component) labels Aug 27, 2024
@github-project-automation github-project-automation bot moved this to Under consideration in Roadmap Aug 27, 2024
@yuriy-fix yuriy-fix moved this from Under consideration to September 2024 (24.5) in Roadmap Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acceptance criteria used for the acceptance criteria checklist DS Design System feature (e.g. component) V24.5
Projects
Status: September 2024 (24.5)
Development

No branches or pull requests

3 participants