refactor: handle rules last name
This commit is contained in:
parent
e0c1725001
commit
c5deb3ecef
1 changed files with 1 additions and 3 deletions
|
|
@ -221,7 +221,6 @@ watch(
|
||||||
class="col"
|
class="col"
|
||||||
:label="$t('personnel.form.lastName')"
|
:label="$t('personnel.form.lastName')"
|
||||||
v-model="lastName"
|
v-model="lastName"
|
||||||
:rules="[(val: string) => !!val || $t('form.error.required')]"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -289,9 +288,8 @@ watch(
|
||||||
label="Surname"
|
label="Surname"
|
||||||
v-model="lastNameEN"
|
v-model="lastNameEN"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val: string) => !!val || $t('form.error.required'),
|
|
||||||
(val: string) =>
|
(val: string) =>
|
||||||
/^[A-Za-z\s]+$/.test(val) || $t('form.error.letterOnly'),
|
!val || /^[A-Za-z\s]+$/.test(val) || $t('form.error.letterOnly'),
|
||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue