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

Form.getErrors() #90

Open
ionutt opened this issue May 7, 2018 · 3 comments
Open

Form.getErrors() #90

ionutt opened this issue May 7, 2018 · 3 comments

Comments

@ionutt
Copy link

ionutt commented May 7, 2018

Is there a way to get all the errors from form? Or at least to get the field with error?

@ekv88
Copy link

ekv88 commented May 11, 2018

I need the same thing.

@ionutt
Copy link
Author

ionutt commented May 11, 2018

I find a solution for that. You can iterate all the fields on the form ( inputs property ) and get all the errors.
I needed to find the first field with error because I need to focus on that field.

@MilosRasic
Copy link
Contributor

Good solution, but I don't like how this is working internally. Validation errors live in form field state and we call field's setState() from from via ref. Might be a good idea to look into moving this state into the form and passing it down to fields for 2.0.

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

No branches or pull requests

4 participants