Email Validation in Android:
Email validation in android, simply we match Pattern like name@gmail.com format…
String.matches if match then email format is valid else not valid format..
for email Pattern:
String pattern= “[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+”;
if (ourEmail.matches(pattern)) {
Email valid format
}
else{
“invalid email format!!
}
Email valid format
}
else{
“invalid email format!!
}
No comments :
Post a Comment