src/main/java/com/hx/util/RegValidatorUtil.java
@@ -9,7 +9,10 @@ * */ public class RegValidatorUtil { /**手机号正则初始化*/ public static Pattern pattern = Pattern.compile("^1[3-9]\\d{9}$"); /** * 验证邮箱 * @@ -94,7 +97,8 @@ */ public static boolean IsHandset(String phoneNumber) { if ((phoneNumber != null) && (!phoneNumber.isEmpty())) { return Pattern.matches("^1[3-9]\\d{9}$", phoneNumber); Matcher m = pattern.matcher(phoneNumber); return m.matches(); } return false; }