ValidateEmailAddress function

bool ValidateEmailAddress(
  1. String value
)

Implementation

bool ValidateEmailAddress(String value) {
  String pattern = r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$';
  RegExp regExp = RegExp(pattern);

  return !regExp.hasMatch(value);
}