新增字母数字正则校验
This commit is contained in:
parent
1fd2dcb70c
commit
fab1303746
@ -83,6 +83,10 @@ public class RegexUtil {
|
||||
* 字母
|
||||
*/
|
||||
private static final Pattern PATTERN_LETTER = Pattern.compile("[a-zA-Z]+");
|
||||
/**
|
||||
* 字母和数字
|
||||
*/
|
||||
private static final Pattern PATTERN_LETTER_OR_NUMBER = Pattern.compile("[a-zA-Z0-9]+");
|
||||
/**
|
||||
* 中文
|
||||
*/
|
||||
@ -278,6 +282,16 @@ public class RegexUtil {
|
||||
return PATTERN_LETTER.matcher(input).matches();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是字母或数字
|
||||
*
|
||||
* @param input
|
||||
* @return
|
||||
*/
|
||||
public static boolean isLetterOrNumber(String input) {
|
||||
return PATTERN_LETTER_OR_NUMBER.matcher(input).matches();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是中文
|
||||
*
|
||||
|
@ -210,6 +210,7 @@
|
||||
title: '选择用户',
|
||||
width: '500px',
|
||||
height: '500px',
|
||||
closeBtn: 0,
|
||||
onClose: function() {
|
||||
var selectedUsers = top.dialog.dialogData.selectedDepartmentUsers;
|
||||
if(selectedUsers != null && selectedUsers.length > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user