List of utility methods to do Email Validate
boolean | isValidEmailAddress(String aEmailAddress) Validate the form of an email address. if (aEmailAddress == null) { return false; boolean result; try { new InternetAddress(aEmailAddress); result = Pattern.matches(EMAIL_PATTERN, aEmailAddress); } catch (AddressException ex) { ... |
boolean | isValidEmailAddress(String email) Checks if whether or not an email address is Valid. final String expression = "^[\\w\\-]([\\.\\w])+[\\w]+@([\\w\\-]+\\.)+[A-Z]{2,4}$"; final CharSequence inputStr = email; final Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE); final Matcher matcher = pattern.matcher(inputStr); return matcher.matches(); |
boolean | isValidEmailAddress(String email) Check if given email is a valid email return EMAIL_REGEX_PATTERN.matcher(email).matches();
|
boolean | isValidEmailAddress(String email) is Valid Email Address return (email != null ? (Pattern.compile("^[_a-z0-9-+]+(\\.[_a-z0-9-+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,6})$", Pattern.CASE_INSENSITIVE).matcher(email).matches()) : false); |
boolean | isValidEmailAddress(String email) is Valid Email Address String ePattern = "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"; java.util.regex.Pattern p = java.util.regex.Pattern.compile(ePattern); java.util.regex.Matcher m = p.matcher(email); return m.matches(); |
boolean | isValidEmailAddress(String email) is Valid Email Address String regex = "^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(email); return matcher.matches(); |
boolean | isValidEmailAddress(String emailAddress) Validates that an email address is a valid email address. if (isEmptyOrWhitespaceOnly(emailAddress)) { return false; return EMAIL_PATTERN.matcher(emailAddress).matches(); |
boolean | isValidEmailAddress(String emailAddress) is Valid Email Address 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])+)\\])"; CharSequence inputStr = emailAddress; Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); return matcher.matches(); |
boolean | isValidEmailAddress(String emailAddress) is Valid Email Address if (isNull(emailAddress)) { return false; Matcher matcher = _emailAddressPattern.matcher(emailAddress); return matcher.matches(); |
boolean | isValidEmailAddress(String emailAddress) Checks whether the given string has a valid syntax for an e-mail address. return EMAIL_PATTERN.matcher(emailAddress).matches();
|