Skip to content

Get List of fields in error from Flutter forms after validation #65573

Description

@vin-fandemand

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?

Activity

  1. pedromassangocode commented on Sep 11, 2020

    @pedromassangocode

    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 you

  2. vin-fandemand commented on Sep 14, 2020

    @vin-fandemand
    Author

    Well, 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.

  3. pedromassangocode commented on Sep 15, 2020

    @pedromassangocode

    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

  4. added
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: proposalA detailed proposal for a change to Flutter
    on Sep 15, 2020
  5. chunhtai commented on Sep 15, 2020

    @chunhtai
    Contributor

    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?

  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 16, 2020
  7. markusaksli-nc commented on Oct 9, 2020

    @markusaksli-nc
    Contributor

    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.

  8. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 9, 2020
  9. github-actions commented on Aug 11, 2021

    @github-actions

    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 -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: text inputEntering text in a text field or keyboard related problemsc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions