List of utility methods to do Email String Validate
boolean | isEmail(String email) if email is valid if (email == null || email.trim().length() == 0) return false; return emailer.matcher(email).matches(); |
boolean | isEmail(String text) is Email if (TextUtils.isEmpty(text)) { return false; Pattern pattern = Pattern.compile(regEmail); Matcher matcher = pattern.matcher(text); return matcher.find(); |
boolean | isEmailFormat(String email) is Email Format return EMAIL_ADDRESS_PATTERN.matcher(email).matches();
|
boolean | isValidEmail(CharSequence target) is Valid Email try { return android.util.Patterns.EMAIL_ADDRESS.matcher(target) .matches(); } catch (NullPointerException exception) { return false; |
boolean | isValidEmailAddress(String email) Validates an email address return email.matches(EMAIL_REGEX) && !email.trim().equals("") && !email.startsWith(" ") && !email.endsWith(" "); |
boolean | isEmailValid(CharSequence email) is Email Valid boolean isValid = false; String expression = "^[\\w\\.-]+@([\\w\\-]+\\.)+[A-Z]{2,4}$"; Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(email); if (matcher.matches()) { isValid = true; return isValid; |
boolean | isEmail(String email) is Email Pattern pattern = Pattern .compile("^\\w+([-.]\\w+)*@\\w+([-]\\w+)*\\.(\\w+([-]\\w+)*\\.)*[a-z]{2,3}$"); Matcher matcher = pattern.matcher(email); if (matcher.matches()) { return true; return false; |
Boolean | isEmail(String str) is Email Boolean isEmail = false; String expr = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; if (str.matches(expr)) { isEmail = true; return isEmail; |
boolean | isEmailValid(String email) is Email Valid String regExpn = "^(([\\w-]+\\.)+[\\w-]+|([a-zA-Z]{1}|[\\w-]{2,}))@" + "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?" + "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\." + "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?" + "[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|" + "([a-zA-Z]+[\\w-]+\\.)+[a-zA-Z]{2,4})$"; CharSequence inputStr = email; Pattern pattern = Pattern ... |
boolean | checkMail(String email) check Mail String input = "@sun.com"; Pattern p = Pattern.compile("^\\.|^\\@"); Matcher m = p.matcher(input); if (m.find()) return false; p = Pattern.compile("^www\\."); m = p.matcher(input); if (m.find()) { ... |