Update password validation rules
This commit is contained in:
parent
98590b773e
commit
7aa85ddaef
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<v-form ref="form" @submit.prevent="submit" validate-on="input">
|
<v-form ref="form" @submit.prevent="submit" validate-on="input lazy">
|
||||||
<v-card :elevation="2" :loading="loading" :disabled="loading">
|
<v-card :elevation="2" :loading="loading" :disabled="loading">
|
||||||
<v-card-title class="mb-6 pa-6 text-center">
|
<v-card-title class="mb-6 pa-6 text-center">
|
||||||
<span class="headline font-weight-light text-h4">Trocar senha</span>
|
<span class="headline font-weight-light text-h4">Trocar senha</span>
|
||||||
|
@ -113,6 +113,7 @@ const newPasswordRules = [
|
||||||
/[a-z]/.test(v) || 'A nova senha deve ter pelo menos uma letra minúscula',
|
/[a-z]/.test(v) || 'A nova senha deve ter pelo menos uma letra minúscula',
|
||||||
(v: string) =>
|
(v: string) =>
|
||||||
/[A-Z]/.test(v) || 'A nova senha deve ter pelo menos uma letra maiúscula',
|
/[A-Z]/.test(v) || 'A nova senha deve ter pelo menos uma letra maiúscula',
|
||||||
|
(v: string) => /\d/.test(v) || 'A nova senha deve ter pelo menos um número',
|
||||||
(v: string) =>
|
(v: string) =>
|
||||||
v.length >= 8 || 'A nova senha deve ter pelo menos 8 caracteres',
|
v.length >= 8 || 'A nova senha deve ter pelo menos 8 caracteres',
|
||||||
(v: string) =>
|
(v: string) =>
|
||||||
|
|
|
@ -33,7 +33,7 @@ const alerts = [
|
||||||
rule: (password: string) => /[A-Z]/.test(password)
|
rule: (password: string) => /[A-Z]/.test(password)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Ao manos um número.',
|
text: 'Ao menos um número.',
|
||||||
rule: (password: string) => /\d/.test(password)
|
rule: (password: string) => /\d/.test(password)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user