/**
* 校验手机号
* @param telephone
* @return
*/
public static boolean isCellPhoneNo(String telephone) {
if (telephone == null || telephone.trim().equals("")) {
return false;
}
if (telephone.length() != 11) {
return false;
}
Pattern pattern = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0-9]))\\d{8}$");
Matcher matcher = pattern.matcher(telephone);
return matcher.matches();
}
Java加入手机号的校验
最新推荐文章于 2024-07-14 02:04:31 发布