List of utility methods to do Email Validate
boolean | isEmailValid(String email) isEmailValid: Validate email address using Java reg ex. boolean isValid = false; String expression = "^[\\w\\.-]+@([\\w\\-]+\\.)+[A-Z]{2,4}$"; CharSequence inputStr = email; Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); if (matcher.matches()) { isValid = true; return isValid; |
boolean | isEmailValid(String emailAddress) is Email Valid try { Pattern alpha = Pattern.compile("[a-zA-Z0-9]@([\\w-]+\\.)+[\\w-]{2,4}$"); Matcher matcher = alpha.matcher(emailAddress.trim()); if (matcher.find()) return true; } catch (Exception ae) { return false; return false; |
boolean | isLegarEmail(String email) is Legar Email boolean flag = false; Pattern p = Pattern.compile("^\\w[-._\\w]*\\w@\\w[-._\\w]*\\w\\.\\w{2,6}$"); Matcher m = p.matcher(email); flag = m.matches(); return flag; |
boolean | isMail(String email) is Mail return check(CHECK_MAIL, email);
|
boolean | isMobilesOrEmail(String str) is Mobiles Or Email if (isMobileNO(str) || isEmail(str)) { return true; return false; |
boolean | isStrEmailAddress(String str) is Str Email Address return PATTERN_EMAIL_ADDR.matcher(str).matches();
|
boolean | isValidEmail(final String email) Indicates wether a given string is a valid email address Email format is : final String expression = "^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")" + "@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$"; final Pattern pattern = Pattern.compile(expression); final Matcher matcher = pattern.matcher(email); return matcher.matches(); |
boolean | isValidEmail(final String email) Validate the format of a user entered email final Matcher matcher = pattern.matcher(email); return matcher.matches(); |
boolean | isValidEmail(String email) Test if a given email string is a valid E-mail address. return email != null && EMAIL_PATTERN.matcher(email).matches();
|
boolean | isValidEmail(String email) is Valid Email boolean err = false; String regex = "^[_a-z0-9-]+(.[_a-z0-9-]+)*@(?:\\w+\\.)+\\w+$"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(email); if (m.matches()) { err = true; return err; ... |