validate method
Calls FormField.validator to set the errorText only if FormField.forceErrorText is null. When FormField.forceErrorText is not null, FormField.validator will not be called.
Returns true if there were no errors. See also:
Implementation
@override
bool validate() {
super.validate();
return (widget.validators ?? []).every(
(validator) {
final res = validator(value, _formiState);
setState(() {
errorText = res;
});
return res == null;
},
);
}