Question Detail
How can i get check Email ID is valid formatted or Not Android?
How can I check that user is entering right Email ID? Is there any email id Formate checker how can check the pattern of Email ID?
Thread Reply
Anonymous
- 4 years ago
if you don't want to set accurate Email Address Checker you can use this.
private boolean isEmailValid(String email) { //TODO: Replace this with your own logic return email.contains("@"); }
Correct Answer
Hemant Sharma
- 4 years ago
public final static boolean isvalidEmailID(CharSequence email) { if (email == null ||
email.toString().isEmpty()) { return false; } else { return android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches(); } }
Correct Answer
Hemant Sharma
- 4 years ago
public final static boolean isvalidEmailID(CharSequence email) { if (email == null ||
email.toString().isEmpty()) { return false; } else { return android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches(); } }
Something More