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
055ed036
Commit
055ed036
authored
Nov 15, 2024
by
Jianli Ou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注册密码校验规则修改
parent
6ca2ff2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
changePass.vue
src/views/MyManage/UnVerify/changePass.vue
+1
-2
register.vue
src/views/User/register.vue
+6
-4
No files found.
src/views/MyManage/UnVerify/changePass.vue
View file @
055ed036
...
...
@@ -23,6 +23,7 @@
{ pattern: pwdPattern, message: '密码长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种',},
{ validator:validatePass,}]">
<el-input
type=
'password'
placeholder=
"请输入新密码"
v-model=
'form.newPass'
></el-input>
<p
style=
"font-size: 13px;font-weight: 400;color: #F23535;line-height: 20px;margin-top: 0;"
>
注:密码长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种
</p>
</el-form-item>
<el-form-item
label=
'验证密码'
...
...
@@ -61,8 +62,6 @@ export default {
},
// pwdPattern: /^(?=.*[a-zA-Z])(?=.*[0-9])[A-Za-z0-9]{6,16}$/,
pwdPattern
:
/^
(?![\d]
+$
)(?![
a-z
]
+$
)(?![
A-Z
]
+$
)(?![
@$!%*#?&
]
+$
)[\d
a-zA-z@$!%*#?&
]{8,20}
$/
,
}
},
methods
:
{
...
...
src/views/User/register.vue
View file @
055ed036
...
...
@@ -67,10 +67,11 @@
prop=
'password'
type=
'password'
:rules=
"[{required: true,message: '不能为空',},
{ pattern: pwdPattern, message: '密码
为6~20位字符
'},
{ pattern: pwdPattern, message: '密码
长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种
'},
{ validator:validatePass,}]"
>
<el-input
type=
'password'
placeholder=
"请输入密码"
v-model=
'form.password'
></el-input>
<p
style=
"font-size: 13px;font-weight: 400;color: #F23535;line-height: 20px"
>
注:密码为6~20位字符
</p>
<!-- <p style="font-size: 13px;font-weight: 400;color: #F23535;line-height: 20px">注:密码为6~20位字符</p>-->
<p
style=
"font-size: 13px;font-weight: 400;color: #F23535;line-height: 20px"
>
注:密码长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种
</p>
</el-form-item>
<el-form-item
label=
'重复密码'
...
...
@@ -118,7 +119,8 @@ export default {
},
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-z0-9_
]{6,20}
$/
,
// pwdPattern: /[A-Za-z0-9_]{6,20}$/,
pwdPattern
:
/^
(?![\d]
+$
)(?![
a-z
]
+$
)(?![
A-Z
]
+$
)(?![
@$!%*#?&
]
+$
)[\d
a-zA-z@$!%*#?&
]{8,20}
$/
,
type
:
this
.
$route
.
query
.
isAgree
||
''
}
},
...
...
@@ -228,7 +230,7 @@ export default {
<
style
lang=
"scss"
>
.register
{
width
:
5
2
0px
;
width
:
5
6
0px
;
margin-right
:
60px
;
margin-left
:
40px
;
...
...
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