修复邮箱格式判定错误
This commit is contained in:
@@ -7,7 +7,7 @@ function keyDown.login(key)
|
||||
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
|
||||
elseif not 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
|
||||
@@ -36,7 +36,7 @@ end
|
||||
WIDGET.init("login",{
|
||||
WIDGET.newText({name="title", x=80, y=50,font=70,align="L"}),
|
||||
WIDGET.newTextBox({name="username", x=380, y=160,w=500,h=60,regex="[0-9A-Za-z_]"}),
|
||||
WIDGET.newTextBox({name="email", x=380, y=260,w=626,h=60,regex="[0-9A-Za-z@-._]"}),
|
||||
WIDGET.newTextBox({name="email", x=380, y=260,w=626,h=60,regex="[0-9A-Za-z@._-]"}),
|
||||
WIDGET.newTextBox({name="code", x=380, y=360,w=626,h=60,regex="[0-9A-Za-z]"}),
|
||||
WIDGET.newTextBox({name="password", x=380, y=460,w=626,h=60,secret=true,regex="[ -~]"}),
|
||||
WIDGET.newTextBox({name="password2",x=380, y=560,w=626,h=60,secret=true,regex="[ -~]"}),
|
||||
|
||||
Reference in New Issue
Block a user