how to set phone number input condition in android 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();
}
}