validate method

bool validate()

Implementation

bool validate() {
  if (_customErrorMessage?.isEmpty ?? true) {
    if (_validators == null) {
      return true;
    } else {
      for (var validator in _validators!) {
        _reassignError(validator.validate(_controller.text));

        if (validator.validate(_controller.text) != null) {
          break;
        }
      }

      return _errorMessage == null;
    }
  } else {
    _reassignError(_customErrorMessage);

    return false;
  }
}