Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
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
钟尚武
sun
Commits
b897a4f6
Commit
b897a4f6
authored
Dec 03, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
验证密码长度
parent
65f8db4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
AccountDetail.vue
vu/src/views/account/components/AccountDetail.vue
+19
-1
No files found.
vu/src/views/account/components/AccountDetail.vue
View file @
b897a4f6
...
@@ -118,6 +118,24 @@
...
@@ -118,6 +118,24 @@
callback
()
callback
()
}
}
}
}
const
validatePasswordLength
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
this
.
$message
({
message
:
rule
.
field
+
'为必传项'
,
type
:
'error'
})
callback
(
new
Error
(
rule
.
field
+
'为必传项'
))
}
else
if
(
value
.
length
<
6
)
{
this
.
$message
({
message
:
'密码不得少于6位'
,
type
:
'error'
})
callback
(
new
Error
(
'密码不得少于6位'
))
}
else
{
callback
()
}
}
return
{
return
{
postForm
:
Object
.
assign
({},
defaultForm
),
postForm
:
Object
.
assign
({},
defaultForm
),
loading
:
false
,
loading
:
false
,
...
@@ -126,7 +144,7 @@
...
@@ -126,7 +144,7 @@
username
:
[{
validator
:
validateRequire
}],
username
:
[{
validator
:
validateRequire
}],
nick_name
:
[{
validator
:
validateRequire
}],
nick_name
:
[{
validator
:
validateRequire
}],
email
:
[{
validator
:
validateRequire
}],
email
:
[{
validator
:
validateRequire
}],
password
:
[{
validator
:
validate
Require
}],
password
:
[{
validator
:
validate
PasswordLength
}],
phone
:
[{
validator
:
validateRequire
}],
phone
:
[{
validator
:
validateRequire
}],
},
},
}
}
...
...
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