用户名不能包含空格校验
This commit is contained in:
parent
b166b1a51c
commit
952b4c2da0
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue