Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
K
kiaisoft_tuananh_nuxt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
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
TTS Tran Viet Anh
kiaisoft_tuananh_nuxt
Commits
4025884b
Commit
4025884b
authored
Feb 01, 2023
by
vietanh-0511
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
password_confirmation
parent
37a18de0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
register.vue
pages/register.vue
+10
-10
No files found.
pages/register.vue
View file @
4025884b
...
@@ -33,15 +33,15 @@
...
@@ -33,15 +33,15 @@
@
click:append=
"showPassword = !showPassword"
@
click:append=
"showPassword = !showPassword"
/>
/>
<v-text-field
<v-text-field
v-model=
"
confirmPassword
"
v-model=
"
password_confirmation
"
:error-messages=
"confirmPasswordErrors"
:error-messages=
"confirmPasswordErrors"
:append-icon=
"showConfirmPassword ? 'mdi-eye' : 'mdi-eye-off'"
:append-icon=
"showConfirmPassword ? 'mdi-eye' : 'mdi-eye-off'"
:type=
"showConfirmPassword ? 'text' : 'password'"
:type=
"showConfirmPassword ? 'text' : 'password'"
label=
"confirmPassword"
label=
"confirmPassword"
hint=
"At least 6 characters"
hint=
"At least 6 characters"
required
required
@
input=
"$v.
confirmPassword
.$touch()"
@
input=
"$v.
password_confirmation
.$touch()"
@
blur=
"$v.
confirmPassword
.$touch()"
@
blur=
"$v.
password_confirmation
.$touch()"
@
click:append=
"showConfirmPassword = !showConfirmPassword"
@
click:append=
"showConfirmPassword = !showConfirmPassword"
/>
/>
<v-btn
class=
"mr-4"
type=
"submit"
>
<v-btn
class=
"mr-4"
type=
"submit"
>
...
@@ -70,14 +70,14 @@ export default {
...
@@ -70,14 +70,14 @@ export default {
name
:
{
required
,
minLength
:
minLength
(
1
),
maxLength
:
maxLength
(
255
)
},
name
:
{
required
,
minLength
:
minLength
(
1
),
maxLength
:
maxLength
(
255
)
},
email
:
{
required
,
email
},
email
:
{
required
,
email
},
password
:
{
required
,
minLength
:
minLength
(
6
)
},
password
:
{
required
,
minLength
:
minLength
(
6
)
},
confirmPassword
:
{
required
,
sameAsPassword
:
sameAs
(
'
password
'
)
}
password_confirmation
:
{
required
,
sameAsPassword
:
sameAs
(
'
password
'
)
}
},
},
data
:
()
=>
({
data
:
()
=>
({
name
:
''
,
name
:
''
,
email
:
''
,
email
:
''
,
password
:
''
,
password
:
''
,
confirmPassword
:
''
,
password_confirmation
:
''
,
showPassword
:
false
,
showPassword
:
false
,
showConfirmPassword
:
false
showConfirmPassword
:
false
}),
}),
...
@@ -113,11 +113,11 @@ export default {
...
@@ -113,11 +113,11 @@ export default {
},
},
confirmPasswordErrors
()
{
confirmPasswordErrors
()
{
const
errors
=
[]
const
errors
=
[]
if
(
!
this
.
$v
.
confirmPassword
.
$dirty
)
{
if
(
!
this
.
$v
.
password_confirmation
.
$dirty
)
{
return
errors
return
errors
}
}
!
this
.
$v
.
confirmPassword
.
required
&&
errors
.
push
(
'
Password confirmation is required
'
)
!
this
.
$v
.
password_confirmation
.
required
&&
errors
.
push
(
'
Password confirmation is required
'
)
!
this
.
$v
.
confirmPassword
.
sameAsPassword
&&
errors
.
push
(
'
Password and confirm password does not match
'
)
!
this
.
$v
.
password_confirmation
.
sameAsPassword
&&
errors
.
push
(
'
Password and confirm password does not match
'
)
return
errors
return
errors
}
}
},
},
...
@@ -131,7 +131,7 @@ export default {
...
@@ -131,7 +131,7 @@ export default {
this
.
name
=
''
this
.
name
=
''
this
.
email
=
''
this
.
email
=
''
this
.
password
=
''
this
.
password
=
''
this
.
confirmPassword
=
''
this
.
password_confirmation
=
''
},
},
async
signup
()
{
async
signup
()
{
try
{
try
{
...
@@ -139,7 +139,7 @@ export default {
...
@@ -139,7 +139,7 @@ export default {
name
:
this
.
name
,
name
:
this
.
name
,
email
:
this
.
email
,
email
:
this
.
email
,
password
:
this
.
password
,
password
:
this
.
password
,
confirm_password
:
this
.
confirm_password
password_confirmation
:
this
.
password_confirmation
}
}
).
then
((
resp
)
=>
{
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
status
===
'
success
'
)
{
if
(
resp
.
data
.
status
===
'
success
'
)
{
...
...
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