|
@@ -892,7 +892,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
String REGEX = "^[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\\d{3}([0-9Xx])$";
|
|
String REGEX = "^[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\\d{3}([0-9Xx])$";
|
|
- if(Validator.isEmpty(itemImport.getIdCard()) || !itemImport.getIdCard().matches(REGEX)){
|
|
|
|
|
|
+ String REGEX2 = "^(H|K|A)?\\d{6}(\\([A-Z0-9]\\)|\\d{2})(\\d|[A-Z])?$|^M\\d{6}(\\([A-Z]\\)|\\d)?$";
|
|
|
|
+ if(Validator.isEmpty(itemImport.getIdCard()) || (!itemImport.getIdCard().matches(REGEX) && !itemImport.getIdCard().matches(REGEX2))){
|
|
itemImport.setCause("身份证不能为空或者格式不对");
|
|
itemImport.setCause("身份证不能为空或者格式不对");
|
|
errorList.add(itemImport);
|
|
errorList.add(itemImport);
|
|
continue;
|
|
continue;
|