What\'s a good technique for validating an e-mail address (e.g. from a user input field) in Android? org.apache.commons.validator.routines.EmailValidator doesn\'t seem to be
Try this simple method which can not accept the email address beginning with digits:
boolean checkEmailCorrect(String Email) {
if(signupEmail.length() == 0) {
return false;
}
String pttn = "^\\D.+@.+\\.[a-z]+";
Pattern p = Pattern.compile(pttn);
Matcher m = p.matcher(Email);
if(m.matches()) {
return true;
}
return false;
}