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

How to get error count #84

Closed
getsetgopi opened this issue Aug 12, 2021 · 1 comment
Closed

How to get error count #84

getsetgopi opened this issue Aug 12, 2021 · 1 comment

Comments

@getsetgopi
Copy link

As per accessibility requirement we need to show total number of errors in a form.
For example:

  1. A form with First name, Last name, email, age, telephone are required field.
  2. User clicks on submit without entering any value to input fields.
  3. We need to show a message on top of the page as "There are 5 errors". Screen reader will announce this message (helpful for non-sighted user).

I tried error.length and did not work. Want to know how can I achieve this to full fill accessibility requirement.

@bluebill1049
Copy link
Member

you will need to use Object.keys with .length instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants