Android Utililty Methods Email String Validate

List of utility methods to do Email String Validate

Description

The list of methods to do Email String Validate are organized into topic(s).

Method

booleanisEmail(String s)
is Email
if (s == null) {
    return true;
return Pattern.matches(EMAIL_REG_EXPRESSION, s);
booleanisValidEmail(String email)
public static boolean isValidEmail(String email)

this method can be used for email format validation if matched then return true else return false
Pattern pattern = Pattern.compile(".+@.+\\.[a-z]+");
Matcher matcher = pattern.matcher(email);
return matcher.matches();
booleanisValidEmail(CharSequence target)
is Valid Email
if (target == null) {
    return false;
} else {
    return android.util.Patterns.EMAIL_ADDRESS.matcher(target)
            .matches();
booleanemailValidator(final String mailAddress)
This method used to email validator.
Pattern pattern;
Matcher matcher;
final String EMAIL_PATTERN = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
        + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
pattern = Pattern.compile(EMAIL_PATTERN);
matcher = pattern.matcher(mailAddress);
return matcher.matches();
booleanvalidateEmail(String aEmailAddress)
Validate email according rules of eXo cloud
if (aEmailAddress == null)
    return false;
boolean result = true;
if (!hasNameAndDomain(aEmailAddress)) {
    result = false;
return result;
booleanvalidateEmail(final String email)
Validate hex with regular expression
if (_emailPattern == null)
    _emailPattern = Pattern.compile(_EMAIL_PATTERN);
Matcher matcher = _emailPattern.matcher(email);
return matcher.matches();