refactor: handle \s

This commit is contained in:
Thanaphon Frappet 2024-11-29 13:32:13 +07:00
parent 7147ed1819
commit 5c39f9756a
2 changed files with 4 additions and 4 deletions

View file

@ -262,7 +262,7 @@ watch(
:rules="[
(val: string) => !!val || $t('form.error.required'),
(val: string) =>
/^[A-Za-z]+$/.test(val) || $t('form.error.letterOnly'),
/^[A-Za-z\s]+$/.test(val) || $t('form.error.letterOnly'),
]"
/>
<q-input
@ -291,7 +291,7 @@ watch(
:rules="[
(val: string) => !!val || $t('form.error.required'),
(val: string) =>
/^[A-Za-z]+$/.test(val) || $t('form.error.letterOnly'),
/^[A-Za-z\s]+$/.test(val) || $t('form.error.letterOnly'),
]"
/>
</div>

View file

@ -387,7 +387,7 @@ watch(
:rules="[
(val: string) => !!val || $t('form.error.required'),
(val: string) =>
/^[A-Za-z]+$/.test(val) || $t('form.error.letterOnly'),
/^[A-Za-z\s]+$/.test(val) || $t('form.error.letterOnly'),
]"
/>
<q-input
@ -402,7 +402,7 @@ watch(
:rules="[
(val: string) => !!val || $t('form.error.required'),
(val: string) =>
/^[A-Za-z]+$/.test(val) || $t('form.error.letterOnly'),
/^[A-Za-z\s]+$/.test(val) || $t('form.error.letterOnly'),
]"
/>
</div>