tryValidate method
Validates the form field value
Implementation
@override
String? tryValidate() {
RegExp exp = RegExp(r"^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6}$");
if (!exp.hasMatch(value)) {
if (customMessage == null) {
return buildMessage(ValidatorStrings.url, attribute);
}
return customMessage;
}
return null;
}