liujie
2026-01-21 b7fd316f22e51db06a105e824daabe7692e28d01
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.estate.expert.admin.utils;
 
import java.util.regex.Pattern;
 
/**
 * 数据验证器
 */
public class DataValidator {
 
    /**
     * 验证手机号
     * @param mobile 手机号
     * @return 是否有效
     */
    public static boolean isValidMobile(String mobile) {
        String regex = "^1[3-9]\\d{9}$";
        return Pattern.matches(regex, mobile);
    }
}