Closed acamenhas closed 4 years ago
In the validation callback, you would take the returned value, do your lookup, and if they don't match you would provide an error string.
validator: (value) {
if (!isInDatabase(value)) return 'Invalid text.';
return null;
},
isInDatabase would be whatever lookup method is needed for your persistence platform.
Hi, I have a CardSettingsText field that needs to check if the entered value is not duplicate (on the database). How can I do an async validation and show the error message on that field?
Thank you!