Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1
Commits
beef2211
Commit
beef2211
authored
Dec 24, 2021
by
tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 注册优化
parent
a771d7d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
register.vue
src/views/User/register.vue
+8
-3
No files found.
src/views/User/register.vue
View file @
beef2211
...
...
@@ -10,7 +10,11 @@
:rules=
"[
{
required: true,
message: '不能为空',
}]">
},
{
pattern: usernamePattern,
message: '注:用户名不能全为数字,且长度不得超过10字符',
},]">
<el-input
v-model=
'form.userName'
autocomplete=
'off'
></el-input>
</el-form-item>
...
...
@@ -62,7 +66,7 @@
prop=
'password'
type=
'password'
:rules=
"[{required: true,message: '不能为空',},
{ pattern: pwdPattern, message: '密码
需要6~16位数字+字母组合',
},
{ pattern: pwdPattern, message: '密码
为6~20位字符'
},
{ validator:validatePass,}]"
>
<el-input
type=
'password'
placeholder=
"请输入密码"
v-model=
'form.password'
></el-input>
</el-form-item>
...
...
@@ -110,8 +114,9 @@ export default {
rePassword
:
''
,
validate
:
''
,
},
usernamePattern
:
/
(?!\d
+$
)[\d
A-Za-z
\u
4e00-
\u
9fa5
]{1,10}
$/
,
mobilePattern
:
/^
((
13
[
0-9
])
|
(
15
[^
4
])
|
(
18
[
0-9
])
|
(
17
[
0-8
])
|
(
147
))\d{8}
$/
,
pwdPattern
:
/
^
(?=
.*
[
a-zA-Z
])(?=
.*
[
0-9
])[
A-Za-z0-9
]{6,16
}
$/
,
pwdPattern
:
/
[
A-Za-z0-9_
]{6,20
}
$/
,
}
},
methods
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment