修改正则工具类发现的问题
This commit is contained in:
parent
85320950a1
commit
553c5909b6
@ -107,7 +107,7 @@ public class RegexUtil {
|
||||
* @return
|
||||
*/
|
||||
public static boolean isEmail(String input) {
|
||||
return PATTERN_PHONE.matcher(input).matches();
|
||||
return PATTERN_EMAIL.matcher(input).matches();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -117,7 +117,7 @@ public class RegexUtil {
|
||||
* @return
|
||||
*/
|
||||
public static boolean isUrl(String input) {
|
||||
return PATTERN_PHONE.matcher(input).matches();
|
||||
return PATTERN_URL.matcher(input).matches();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -127,7 +127,7 @@ public class RegexUtil {
|
||||
* @return
|
||||
*/
|
||||
public static boolean isDate(String input) {
|
||||
return PATTERN_PHONE.matcher(input).matches();
|
||||
return PATTERN_DATE.matcher(input).matches();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -137,7 +137,7 @@ public class RegexUtil {
|
||||
* @return
|
||||
*/
|
||||
public static boolean isIdentity(String input) {
|
||||
return PATTERN_PHONE.matcher(input).matches();
|
||||
return PATTERN_IDENTITY.matcher(input).matches();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user