From 952b4c2da0f014cf96c38b62da467d5438eb3754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Thu, 13 Apr 2023 14:06:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=8C=85=E5=90=AB=E7=A9=BA=E6=A0=BC=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/loginRegister/Register.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/loginRegister/Register.jsx b/src/modules/loginRegister/Register.jsx index 6083fe6f6..b8c3ef2c2 100644 --- a/src/modules/loginRegister/Register.jsx +++ b/src/modules/loginRegister/Register.jsx @@ -71,7 +71,7 @@ function Register(props){ type: 1 }).then(response => { if (response.data.status === -1) { - callback('该名称已经被使用'); + callback(response.data.message); } else { setLoginStr(value); setUserNameGo(false); @@ -250,6 +250,10 @@ function Register(props){ pattern: /[a-zA-Z0-9]$/, message: "用户名只能使用英文字母和数字" }, + { + pattern: /^\s*$/, + message: "用户名不能包含空格" + }, { min: 4, max: 15,