flutter_form_builder
flutter_form_builder copied to clipboard
Asynchronous validator
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);
}
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.