加入邮箱格式检测

This commit is contained in:
MrZ626
2020-10-31 15:40:14 +08:00
parent 9454720436
commit 2867727bf1
5 changed files with 8 additions and 2 deletions

View File

@@ -2916,6 +2916,8 @@ do--login
local password2=WIDGET.active.password2.value
if #username==0 then
LOG.print(text.noUsername)return
elseif #email~=#email:match("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$")then
LOG.print(text.wrongEmail)return
elseif #password==0 or #password2==0 then
LOG.print(text.noPassword)return
elseif password~=password2 then