/**
* 手机号验证
* @param phoneNum
* @return
*/
public static boolean CheckMobilePhoneNum(String phoneNum) {
String regex = "^(1[3-9]\\d{9}$)";
if (phoneNum.length() == 11) {
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(phoneNum);
if (m.matches()) {
return true;
}
}
return false;
}
java验证手机号格式
最新推荐文章于 2024-06-19 11:34:50 发布