validator method

  1. @override
String? validator([
  1. Object? object
])
override

This method returns null if the field is valid. Otherwise it will return the error's string specified in the validator (see Validator).

Implementation

@override
String? validator([Object? object]) {
  sendForceErrorEvent();

  if (!form.isComplete()) {
    return form.getFirstError();
  }

  return super.validator(object);
}