List of utility methods to do Email Validate
boolean | isEmail(String value) is Email if (value == null || value.trim().equals("")) return false; Pattern p = Pattern.compile( "^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$"); Matcher m = p.matcher(value); return m.matches(); |
boolean | isEmail(String value) is Email Matcher matcher = EMAIL_ADDRESS_PATTERN.matcher(value);
return matcher.matches();
|
boolean | isEmailAddress(String input) is Email Address if (input == null || input.trim().length() <= 0) return false; Pattern pattern = Pattern.compile( "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z]{2,}){1}$)"); try { Matcher matcher = pattern.matcher(input); if (matcher.matches()) return true; ... |
boolean | isEmailAddressFormat(String address) is Email Address Format if (address == null) { return false; return Pattern.compile("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$").matcher(address).matches(); |
boolean | isEmailAddressValid(String emailAddress) is Email Address Valid return emailPattern.matcher(emailAddress).matches();
|
boolean | isEmailer(String email) is Emailer if (email == null || email.trim().length() == 0) return false; return emailer.matcher(email).matches(); |
boolean | isEmailFormatValid(String emailAddress) is Email Format Valid if (emailAddress == null || emailAddress.trim().length() == 0) throw new IllegalArgumentException("Do not empty email address to this method."); return emailPattern.matcher(emailAddress).matches(); |
boolean | isEmailValid(String address) Checks e-mail addresses for invalid characters. final Pattern p = Pattern.compile("[A-Za-z0-9\\.\\@_\\-~#]+"); final Matcher m = p.matcher(address); return m.matches(); |
boolean | isEmailValid(String email) Return true if Email has a valid format if (email == null) { return false; Pattern pattern = Pattern.compile(REGEX_EMAIL); Matcher matcher = pattern.matcher(email); return matcher.matches(); |
boolean | isEmailValid(String email) is Email Valid return addressPattern.matcher(email).matches();
|