List of utility methods to do Email String Validate
boolean | isEmail(String s) is Email if (s == null) { return true; return Pattern.matches(EMAIL_REG_EXPRESSION, s); |
boolean | isValidEmail(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(); |
boolean | isValidEmail(CharSequence target) is Valid Email if (target == null) { return false; } else { return android.util.Patterns.EMAIL_ADDRESS.matcher(target) .matches(); |
boolean | emailValidator(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(); |
boolean | validateEmail(String aEmailAddress) Validate email according rules of eXo cloud if (aEmailAddress == null) return false; boolean result = true; if (!hasNameAndDomain(aEmailAddress)) { result = false; return result; |
boolean | validateEmail(final String email) Validate hex with regular expression if (_emailPattern == null) _emailPattern = Pattern.compile(_EMAIL_PATTERN); Matcher matcher = _emailPattern.matcher(email); return matcher.matches(); |