Repository navigation
Get List of fields in error from Flutter forms after validation #65573
Description
Activity
Hi @vin-fandemand
This issue doesn't seem to describe a bug or a feature request. Please see https://flutter.dev/community for resources and asking questions like this, you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank youWell, that is the feature request. There is no way to know which all form fields are in error from a Form Unless the user scrolls through each field. If we had a way to identify which form fields were in error, we could easily direct the focus to those fields. I couldn't find a way to do this in the documentation or on stalk overflow. Hence I believe it is a feature request.
This feature would add too much complexity into the form validation API and I'm not sure if we want to have that. I will leave it opened for others to decide what actions to take on this.
Cc: @chunhtai
- addeda: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutter
on Sep 15, 2020 You can query that information manually from each formfield using https://api.flutter.dev/flutter/widgets/FormFieldState/isValid.html. Does this work for your use case?
- addedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on Sep 16, 2020 Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.- removedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on Oct 9, 2020 This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Aug 11, 2021
Use case
Can we get the list of fields in error from Flutter forms after validation? This will help developers use focus-nodes to redirect their attention to the field in error. Is there already a way to do this?