isAnEmail static method
Checks if checkValue
can be matched by the regular expression emailRegExp
If checkValue
is null or is not matched by emailRegExp the errorMessage
will be returned if provided, otherwise the default error. Otherwise null
is returned
Implementation
static String? isAnEmail(String? checkValue, {String? errorMessage}) {
return matches(checkValue, emailRegExp,
errorMessage: errorMessage ?? "Not a valid email");
}