提交 c2f056b8 编写于 作者: 泰斯特Test's avatar 泰斯特Test

[fix]修复邮箱判断

上级 18603ca2
......@@ -401,8 +401,7 @@ def frontend_date_str2datetime(input_str, timedelta=None):
def is_valid_email(email):
re_email = re.compile(r'^[a-zA-Z0-9\.]+@[a-zA-Z0-9]+\.[a-zA-Z]{3}$')
if re_email.match(email):
if re.match('^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$', email):
return True
else:
return False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册