validateEmail static method

String? validateEmail(
  1. String value, {
  2. String? errorMessage,
})

Implementation

static String? validateEmail(
  String value, {
  String? errorMessage,
}) {
  appLogsNS("validateEmail : $value ");

  if (value.trim().isEmpty) return enterEmail;

  if (hasMatch(pattern: emailPattern, value: value)) return null;

  return errorMessage ?? enterValidEmail;
}