validateEmail function

String? validateEmail(
  1. String? email
)

Validator functions

Implementation

String? validateEmail(String? email) {
  if (email == null || email.isEmpty) {
    return "lbl_email_required";
  } else if (!email.contains('@')) {
    return "lbl_email_must_contain_at";
  } else if (!email.contains('.')) {
    return "lbl_email_must_contain_dot";
  }
  return null;
}