flutter_form_builder icon indicating copy to clipboard operation
flutter_form_builder copied to clipboard

Asynchronous validator

Open farukaziz opened this issue 4 years ago • 1 comments

How do I validate asynchronously? The validator require String return so I can not add Future

How can I do like as below with Flutter form builder?

validator: myValidator
Future myValidator(String userId) async{
    return await checkUser(userId);
}

farukaziz avatar Jun 23 '21 12:06 farukaziz

This would be a great feature. Use cases include things checking if an email addresses already exists in db, using a cloud function to check an image for adult content, hit a cloud spam-checking service to validate text, etc. Allowing this to happen async would really make a smooth flow and not have to break the pattern.

nolandg avatar Jul 18 '21 22:07 nolandg