validate method

bool validate()

Validate the field

Implementation

bool validate() {
  _touched = true;
  for (final validator in _validators) {
    final error = validator(value);
    if (error != null) {
      _error.value = error;
      return false;
    }
  }
  _error.value = null;
  return true;
}