Match password policy with backend
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<v-text-field
|
||||
label="Password*"
|
||||
type="password"
|
||||
hint="Minimal 8 karakter, kombinasi huruf dan angka"
|
||||
hint="Minimal 8 karakter, wajib huruf besar, huruf kecil, angka, dan simbol"
|
||||
persistent-hint
|
||||
v-model="password"
|
||||
></v-text-field>
|
||||
@@ -145,8 +145,8 @@ module.exports = {
|
||||
alert('Password minimal 8 karakter')
|
||||
return false
|
||||
}
|
||||
if (!(/[A-Za-z]/.test(pwd) && /[0-9]/.test(pwd))) {
|
||||
alert('Password harus kombinasi huruf dan angka')
|
||||
if (!(/[A-Z]/.test(pwd) && /[a-z]/.test(pwd) && /[0-9]/.test(pwd) && /[^A-Za-z0-9]/.test(pwd))) {
|
||||
alert('Password harus mengandung huruf besar, huruf kecil, angka, dan simbol')
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user