提交 bc68d9a0 编写于 作者: Z zhukai 提交者: khadgarmage

The method checkEmail do not have null check (#1481)

When the email is empty , it wll be nullpointexception.

So i fix it with null check.
上级 bfa3a36c
......@@ -53,6 +53,10 @@ public class CheckUtils {
* @return true if email regex valid, otherwise return false
*/
public static boolean checkEmail(String email) {
if (StringUtils.isEmpty(email)){
return false;
}
return email.length() > 5 && email.length() <= 40 && regexChecks(email, Constants.REGEX_MAIL_NAME) ;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册