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,