Commit b31fd2b4 authored by 李灿灿's avatar 李灿灿

Merge branch 'feature-licancan' into 'develop'

身份证格式带x的只能大写

See merge request fangxinjiang/yifu!120
parents 64076218 2b9c5e72
...@@ -69,4 +69,6 @@ public class ValidityConstants { ...@@ -69,4 +69,6 @@ public class ValidityConstants {
/** 不超过两位小数的正数 */ /** 不超过两位小数的正数 */
public static final String POSITIVE_INTEGER_PATTERN_TWO_FLOAT = "^[+]?([0-9]+(.[0-9]{1,2})?)$"; public static final String POSITIVE_INTEGER_PATTERN_TWO_FLOAT = "^[+]?([0-9]+(.[0-9]{1,2})?)$";
/** 身份证规则(x只能大写) */
public static final String IDCARD_UPPERCASE_PATTERN = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9X]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)" ;
} }
...@@ -150,7 +150,7 @@ public class ValidityUtil { ...@@ -150,7 +150,7 @@ public class ValidityUtil {
if(Common.isEmpty(idCard)){ if(Common.isEmpty(idCard)){
return Boolean.FALSE ; return Boolean.FALSE ;
} }
return idCard.matches(ValidityConstants.IDCARD_PATTERN) ; return idCard.matches(ValidityConstants.IDCARD_UPPERCASE_PATTERN) ;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment