From 2867727bf107bda0ef19a7f66d1b46bbe196f6f5 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 31 Oct 2020 15:40:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E9=82=AE=E7=AE=B1=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LANG/lang_en.lua | 1 + LANG/lang_symbol.lua | 1 + LANG/lang_yygq.lua | 5 +++-- LANG/lang_zh.lua | 1 + parts/scenes.lua | 2 ++ 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/LANG/lang_en.lua b/LANG/lang_en.lua index 53248ddb..59bd9bdf 100644 --- a/LANG/lang_en.lua +++ b/LANG/lang_en.lua @@ -69,6 +69,7 @@ return{ registerFailed="Registration failed", netErrorCode="Network error code", noUsername="Please enter your username", + wrongEmail="Wrong email address", noPassword="Please enter your password", diffPassword="Passwords don't match", errorMsg="An error has occurred and Techmino needs to restart.\nError info has been created, and you can send it to the author.", diff --git a/LANG/lang_symbol.lua b/LANG/lang_symbol.lua index 6018ca40..26695fa6 100644 --- a/LANG/lang_symbol.lua +++ b/LANG/lang_symbol.lua @@ -69,6 +69,7 @@ return{ registerFailed="Register failed", netErrorCode="Network error code", noUsername="Input username", + wrongEmail="Wrong email address", noPassword="Input password", diffPassword="Password don't match", errorMsg="An e??o? h@s occ^__ed @nd Techmino n__ds to r_st@rt.\n&**o* in#o h@$ b==n cre@ted, @nd y0u c@n $&nd it to the @uth0r.", diff --git a/LANG/lang_yygq.lua b/LANG/lang_yygq.lua index 7ada9b8a..a1d3143b 100644 --- a/LANG/lang_yygq.lua +++ b/LANG/lang_yygq.lua @@ -30,8 +30,9 @@ return{ ranks={"菜","可","好","强","您"}, - noUsername="账号密码都填不来?", - noPassword="账号密码都填不来?", + noUsername="账号填不来?", + wrongEmail="邮箱不会填?", + noPassword="密码填不来?", diffPassword="账号密码都填不来?", acts={ diff --git a/LANG/lang_zh.lua b/LANG/lang_zh.lua index 24378666..2c361b2a 100644 --- a/LANG/lang_zh.lua +++ b/LANG/lang_zh.lua @@ -69,6 +69,7 @@ return{ registerFailed="注册失败", netErrorCode="网络错误码", noUsername="请填写用户名", + wrongEmail="邮箱格式错误", noPassword="请填写密码", diffPassword="两次密码不一致", errorMsg="Techmino遭受了雷击,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.", diff --git a/parts/scenes.lua b/parts/scenes.lua index 8d39ac16..18af29ef 100644 --- a/parts/scenes.lua +++ b/parts/scenes.lua @@ -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