feat: validate email
This commit is contained in:
parent
d6e8d754ab
commit
9466019303
3 changed files with 18 additions and 0 deletions
|
|
@ -31,6 +31,12 @@ const telephone = defineModel<string>('telephone');
|
|||
hide-bottom-space
|
||||
class="col-md-6 col-12"
|
||||
:label="$t('form.email')"
|
||||
:rules="[
|
||||
(v: string) => !!v || $t('form.error.required'),
|
||||
(v: string) =>
|
||||
/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/g.test(v) ||
|
||||
$t('form.error.invalid'),
|
||||
]"
|
||||
v-model="mail"
|
||||
/>
|
||||
<q-input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue