refactor: edit rules

This commit is contained in:
Net 2024-09-25 13:18:00 +07:00
parent 4058a7613a
commit 630a667c64

View file

@ -206,7 +206,7 @@ watch(
:rules="[ :rules="[
(val: string) => val.length > 2 || $t('form.error.required'), (val: string) => val.length > 2 || $t('form.error.required'),
(val: string) => (val: string) =>
(val.length > 0 && /^[a-zA-Z0-9\s_]+$/.test(val)) || (val.length > 0 && /^[a-zA-Z0-9_]+$/.test(val)) ||
$t('form.error.letterAndNumOnly'), $t('form.error.letterAndNumOnly'),
]" ]"
/> />