emailValid method

bool emailValid()

Implementation

bool emailValid() {
  if (this == null) return false;
  String pattern = r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$";
  RegExp exp = RegExp(pattern);
  return exp.hasMatch(this!);
}