mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add idcard validate
This commit is contained in:
@@ -218,6 +218,12 @@ public class IdcardUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 省份
|
||||
final String proCode = idCard.substring(0, 2);
|
||||
if (null == CITY_CODES.get(proCode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//校验生日
|
||||
if (false == Validator.isBirthday(idCard.substring(6, 14))) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user