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 only show validation errors on change #65

Closed
stocksp opened this issue May 23, 2019 · 5 comments
Closed

How to only show validation errors on change #65

stocksp opened this issue May 23, 2019 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@stocksp
Copy link

stocksp commented May 23, 2019

If autovalidate is true on the FormBuilder:
All validation errors are shown for the whole form as soon as one control is edited.

If autovalidate is false on the FormBuilder but true on the FormBuilderXX widgets
all validation errors are show as soon as the form loads.

Both of these are wrong.
Validation errors should only be show when the widget is changed. So the user is only shown one error at a time at the moment they make the edit.
Submit should not be enabled if the form is not valid.

Can this be achieved in Flutter (I hope) ?

@shengzhou1216
Copy link

+1

@kansson
Copy link

kansson commented Nov 28, 2019

Is there a solution to this since the issue was closed?

@ChristBKK
Copy link

I have the same problem?

@stocksp
Copy link
Author

stocksp commented Jan 13, 2020

Forms processing in Flutter is probably it’s weakest. This package will not help you. Some day someone will write a Formik or Finalform like the JavaScript world has. It’s very hard and tedious in Flutter. For modest (a few simple controls) forms it’s doable. You must create and manage the focusNodes for each control to generate an ‘onBlur’ and ‘isDirty’ etc and then hook these into your validation logic. For serious business form processing ... forget it

@ChristBKK
Copy link

@stocksp thanks for that input. I agree with your points, focusNodes is also quite complicated for that simple logic.

@danvick thanks for your good work with this package. Can you check on this topic again? It feels like the biggest problem for me right now using your validations.
Or where do I find the duplicated issue for this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

5 participants