email valid android code example
Example 1: email valid android
public static boolean isValidEmail(CharSequence target) {
return (!TextUtils.isEmpty(target) && Patterns.EMAIL_ADDRESS.matcher(target).matches());
}
Example 2: validate email in android
String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+";
if (_______.matches(emailPattern)) {
regfullname.setError("invalid email adress");
return false;
}