mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add re
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
# 5.6.2 (2021-03-18)
|
# 5.6.2 (2021-03-18)
|
||||||
|
|
||||||
### 新特性
|
### 新特性
|
||||||
|
* 【core 】 Validator增加车架号(车辆识别码)验证、驾驶证(驾驶证档案编号)的正则校验(pr#280@Gitee)
|
||||||
### Bug修复
|
### Bug修复
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
@@ -1167,7 +1167,7 @@ public class Validator {
|
|||||||
* @since 5.6.3
|
* @since 5.6.3
|
||||||
*/
|
*/
|
||||||
public static <T extends CharSequence> T validateCarVin(T value, String errorMsg) throws ValidateException {
|
public static <T extends CharSequence> T validateCarVin(T value, String errorMsg) throws ValidateException {
|
||||||
if (!isCarVin(value)) {
|
if (false == isCarVin(value)) {
|
||||||
throw new ValidateException(errorMsg);
|
throw new ValidateException(errorMsg);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
@@ -1196,7 +1196,7 @@ public class Validator {
|
|||||||
* @since 5.6.3
|
* @since 5.6.3
|
||||||
*/
|
*/
|
||||||
public static <T extends CharSequence> T validateCarDrivingLicence(T value, String errorMsg) throws ValidateException {
|
public static <T extends CharSequence> T validateCarDrivingLicence(T value, String errorMsg) throws ValidateException {
|
||||||
if (!isCarDrivingLicence(value)) {
|
if (false == isCarDrivingLicence(value)) {
|
||||||
throw new ValidateException(errorMsg);
|
throw new ValidateException(errorMsg);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
Reference in New Issue
Block a user