增加字段字符与数字组合校验
This commit is contained in:
parent
87e584a3db
commit
fb5b83ffbd
@ -193,8 +193,13 @@ public class BeanPropertyCheckUtil {
|
|||||||
throw new ParamsException(String.format("%s格式非字母格式", name));
|
throw new ParamsException(String.format("%s格式非字母格式", name));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
} else if (StringUtils.equals("letterOrNumber", verifyType)) {
|
||||||
|
if (!RegexUtil.isLetterOrNumber(value)) {
|
||||||
|
throw new ParamsException(String.format("%s格式非字母与数字格式", name));
|
||||||
|
}
|
||||||
|
return;
|
||||||
} else if (StringUtils.equals("chinese", verifyType)) {
|
} else if (StringUtils.equals("chinese", verifyType)) {
|
||||||
if (!RegexUtil.isLetter(value)) {
|
if (!RegexUtil.isChinese(value)) {
|
||||||
throw new ParamsException(String.format("%s格式非中文格式", name));
|
throw new ParamsException(String.format("%s格式非中文格式", name));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user