emailValidate static method
Implementation
static dynamic emailValidate(
{required dynamic email, required String fieldName}) {
return email == null || email.toString().trim() == ''
? "Please Enter $fieldName"
: !RegExp(r'\S+@\S+\.\S+').hasMatch(email)
? "Please enter a valid $fieldName"
: null;
}