validate method

bool validate()

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

bool validate() {
  setState(() {
    _validate();
  });
  return !hasError;
}