tryValidate method

  1. @override
String? tryValidate()
override

Validates the form field value

Implementation

@override
String? tryValidate() {
  if (!value.endsWith(extra)) {
    if (customMessage == null) {
      return buildMessage(ValidatorStrings.endsWith, attribute, extra);
    }
    return customMessage;
  }
  return null;
}