private boolean isPhone(String phone, String pwd) {
if(TextUtils.isEmpty(phone)||TextUtils.isEmpty(pwd)){
Toast.makeText(context,"用户名或密码不能为空",Toast.LENGTH_LONG).show();
return false;
}else if(phone=="^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\\d{8}$"){
Toast.makeText(context,"手机号格式不正确",Toast.LENGTH_LONG).show();
return false;
}
return true;
}
判断手机号
最新推荐文章于 2024-04-28 10:35:01 发布