This commit is contained in:
Looly 2020-08-21 20:30:37 +08:00
parent ab6cd0763c
commit 7e4889945c
3 changed files with 13 additions and 0 deletions

View File

@ -10,6 +10,7 @@
* 【core 】 BeanCopier修改规则可选bean拷贝空字段报错问题pr#160@Gitee
* 【http 】 HttpUtil增加downloadFileFromUrlpr#1023@Github
* 【core 】 增加toEpochMilli方法
* 【core 】 Validator修改isCitizenId校验pr#1032@Github
### Bug修复#
* 【poi 】 修复ExcelBase.isXlsx方法判断问题issue#I1S502@Gitee

View File

@ -56,6 +56,12 @@ public class PatternPool {
* 移动电话
*/
public final static Pattern MOBILE = Pattern.compile("(?:0|86|\\+86)?1[3-9]\\d{9}");
/**
* 18位身份证号码
*/
public final static Pattern CITIZEN_ID = Pattern.compile("[1-9]\\d{5}[1-2]\\d{3}((0\\d)|(1[0-2]))(([012]\\d)|3[0-1])\\d{3}(\\d|X|x)");
/**
* 邮编
*/

View File

@ -52,6 +52,12 @@ public class Validator {
* 移动电话
*/
public final static Pattern MOBILE = PatternPool.MOBILE;
/**
* 身份证号码
*/
public final static Pattern CITIZEN_ID = PatternPool.CITIZEN_ID;
/**
* 邮编
*/