java android edittext phone number validation code example
Example: mobile number validation to edittext in android
public boolean isValidPhone(CharSequence phone) {
if (TextUtils.isEmpty(phone)) {
return false;
} else {
return android.util.Patterns.PHONE.matcher(phone).matches();
}
}