flutter_form_builder icon indicating copy to clipboard operation
flutter_form_builder copied to clipboard

Access to error list strings from each field

Open robertoltrocha opened this issue 3 years ago • 1 comments
trafficstars

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**

    }
  }

robertoltrocha avatar Apr 30 '22 00:04 robertoltrocha

Not at the moment, no.

We may however think of adding the feature in the future if there's demand for it. If you think this feature will be helpful to you and others at this time consider submitting a PR of the same.

danvick avatar May 19 '22 19:05 danvick