refactor:handle rules registerName
This commit is contained in:
parent
65b603ab42
commit
aa032a6731
1 changed files with 3 additions and 2 deletions
|
|
@ -143,9 +143,10 @@ watch(
|
||||||
for="input-register-name-en"
|
for="input-register-name-en"
|
||||||
v-model="registerNameEN"
|
v-model="registerNameEN"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val: string) => !!val || $t('form.error.required'),
|
|
||||||
(val: string) =>
|
(val: string) =>
|
||||||
/^[0-9A-Za-z\s.,]+$/.test(val) || $t('form.error.letterOnly'),
|
val === '' ||
|
||||||
|
/^[0-9A-Za-z\s.,]+$/.test(val) ||
|
||||||
|
$t('form.error.letterOnly'),
|
||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue