mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix 1032
This commit is contained in:
parent
ab6cd0763c
commit
7e4889945c
@ -10,6 +10,7 @@
|
||||
* 【core 】 BeanCopier修改规则,可选bean拷贝空字段报错问题(pr#160@Gitee)
|
||||
* 【http 】 HttpUtil增加downloadFileFromUrl(pr#1023@Github)
|
||||
* 【core 】 增加toEpochMilli方法
|
||||
* 【core 】 Validator修改isCitizenId校验(pr#1032@Github)
|
||||
|
||||
### Bug修复#
|
||||
* 【poi 】 修复ExcelBase.isXlsx方法判断问题(issue#I1S502@Gitee)
|
||||
|
@ -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)");
|
||||
|
||||
/**
|
||||
* 邮编
|
||||
*/
|
||||
|
@ -52,6 +52,12 @@ public class Validator {
|
||||
* 移动电话
|
||||
*/
|
||||
public final static Pattern MOBILE = PatternPool.MOBILE;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
public final static Pattern CITIZEN_ID = PatternPool.CITIZEN_ID;
|
||||
|
||||
/**
|
||||
* 邮编
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user