Skip to content

Access to error list strings from each field #1014

@robertoltrocha

Description

@robertoltrocha

Hi,
How can I get a list of text errors from all fields when submit and the form is not valid? I would like to show theses errors in another widget or format.

 void savePressed() async {
    final form = _formKey.currentState;
    if (form!.validate()) {
      form.save();     
    } else {
      **// HERE I WOULD LIKE TO HAVE ACCESS TO THE ERROR LIST**

    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions