validateField method

  1. @override
void validateField()
override

Validates field, and pushes result to the ValidationController

Implementation

@override
void validateField() {
  if (_controller == null) {
    throw UnsupportedError('Connector should be attached to the controller');
  }

  final String? error = validate();
  if (error == null) {
    return _controller!.clearFieldError(field);
  }

  _controller!.addFieldError(field, error);
}