Skip to content

Commit 1efd640

Browse files
authored
Merge pull request #1012 from AlisProject/ALIS-5282
ALIS-5282: Update validate for wallet password.
2 parents 4b97e94 + 4357c20 commit 1efd640

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

app/components/molecules/RequestInputWalletPasswordModalForm.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
</span>
1919
<form class="wallet-password-form" @keypress.enter.prevent="onSubmit">
2020
<form-group
21-
label="パスワード※半角英数字8文字以上 "
21+
label="パスワード※半角英数字記号8文字以上 "
2222
:inputAttrs="{ ref: 'walletPassword', type: 'password', placeholder: '●●●●●●●●' }"
2323
:hasError="hasPasswordError"
2424
:errorMessage="
25-
showErrorInvalidPassword ? 'パスワードは8文字以上で入力してください' : ''
25+
showErrorInvalidPassword
26+
? 'パスワードは半角英数字記号かつ8文字以上で入力してください'
27+
: ''
2628
"
2729
@input="setWalletPassword"
2830
@blur="showError('walletPassword')"
@@ -81,7 +83,7 @@ export default {
8183
showErrorInvalidPassword() {
8284
return (
8385
this.requestWalletPasswordModal.inputWalletPassword.formError.walletPassword &&
84-
!this.$v.requestWalletPasswordModal.inputWalletPassword.formData.walletPassword.minLength
86+
this.$v.requestWalletPasswordModal.inputWalletPassword.formData.walletPassword.$error
8587
)
8688
},
8789
showErrorInvalidRepeatPassword() {
@@ -113,7 +115,10 @@ export default {
113115
formData: {
114116
walletPassword: {
115117
required,
116-
minLength: minLength(8)
118+
minLength: minLength(8),
119+
function(value) {
120+
return /^[a-zA-Z0-9!-/:-@¥[-`{-~]*$/.test(value)
121+
}
117122
}
118123
}
119124
}

app/components/molecules/SignUpAuthFlowInputWalletPasswordModalForm.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
</span>
1616
<form class="wallet-password-form" @keypress.enter.prevent="onSubmit">
1717
<form-group
18-
label="パスワード※半角英数字8文字以上 "
18+
label="パスワード※半角英数字記号8文字以上 "
1919
:inputAttrs="{ ref: 'walletPassword', type: 'password', placeholder: '●●●●●●●●' }"
2020
:hasError="hasPasswordError"
2121
:errorMessage="
22-
showErrorInvalidPassword ? 'パスワードは8文字以上で入力してください' : ''
22+
showErrorInvalidPassword
23+
? 'パスワードは半角英数字記号かつ8文字以上で入力してください'
24+
: ''
2325
"
2426
@input="setWalletPassword"
2527
@blur="showError('walletPassword')"
@@ -76,7 +78,7 @@ export default {
7678
showErrorInvalidPassword() {
7779
return (
7880
this.signUpAuthFlowModal.inputWalletPassword.formError.walletPassword &&
79-
!this.$v.signUpAuthFlowModal.inputWalletPassword.formData.walletPassword.minLength
81+
this.$v.signUpAuthFlowModal.inputWalletPassword.formData.walletPassword.$error
8082
)
8183
},
8284
showErrorInvalidRepeatPassword() {
@@ -108,7 +110,10 @@ export default {
108110
formData: {
109111
walletPassword: {
110112
required,
111-
minLength: minLength(8)
113+
minLength: minLength(8),
114+
function(value) {
115+
return /^[a-zA-Z0-9!-/:-@¥[-`{-~]*$/.test(value)
116+
}
112117
}
113118
}
114119
}

0 commit comments

Comments
 (0)