refactor: header only EN

This commit is contained in:
Net 2024-09-09 16:21:54 +07:00
parent 773aa37d15
commit 95d25a9320
6 changed files with 23 additions and 3 deletions

View file

@ -217,7 +217,11 @@ watch(
class="col"
:label="$t('personnel.form.firstNameEN')"
v-model="firstNameEN"
:rules="[(val: string) => !!val || $t('form.error.required')]"
:rules="[
(val: string) => !!val || $t('form.error.required'),
(val: string) =>
/^[A-Za-z]+$/.test(val) || $t('form.error.letterOnly'),
]"
/>
<q-input
:for="`${prefixId}-input-mid-name-en`"
@ -242,7 +246,11 @@ watch(
class="col"
:label="$t('personnel.form.lastNameEN')"
v-model="lastNameEN"
:rules="[(val: string) => !!val || $t('form.error.required')]"
:rules="[
(val: string) => !!val || $t('form.error.required'),
(val: string) =>
/^[A-Za-z]+$/.test(val) || $t('form.error.letterOnly'),
]"
/>
</div>