mirror of https://gitee.com/xiaonuobase/snowy
【修复】修复 #I73UGD 邮箱带有下划线无法校验成功的bug
parent
8cc6880b9e
commit
1c6abf5f3f
|
@ -12,6 +12,7 @@
|
||||||
*/
|
*/
|
||||||
package vip.xiaonuo.common.util;
|
package vip.xiaonuo.common.util;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Validator;
|
||||||
import cn.hutool.core.util.ReUtil;
|
import cn.hutool.core.util.ReUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import vip.xiaonuo.common.exception.CommonException;
|
import vip.xiaonuo.common.exception.CommonException;
|
||||||
|
@ -31,7 +32,7 @@ public class CommonEmailUtil {
|
||||||
* @date 2022/8/15 13:32
|
* @date 2022/8/15 13:32
|
||||||
**/
|
**/
|
||||||
public static boolean isEmail(String email) {
|
public static boolean isEmail(String email) {
|
||||||
return ReUtil.isMatch("^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$", email);
|
return Validator.isEmail(email);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue