fix(02): only letter and number username
This commit is contained in:
parent
30379bfe25
commit
dc3e9ae0d1
4 changed files with 10 additions and 1 deletions
|
|
@ -179,8 +179,14 @@ onMounted(async () => {
|
|||
class="col-md col-12"
|
||||
:label="$t('personnel.form.username')"
|
||||
v-model="username"
|
||||
:rules="[(val: string) => val.length > 2 || $t('form.error.required')]"
|
||||
:rules="[
|
||||
(val: string) => val.length > 2 || $t('form.error.required'),
|
||||
(val: string) =>
|
||||
(val.length > 0 && /^[a-zA-Z0-9]+$/.test(val)) ||
|
||||
$t('form.error.letterAndNumOnly'),
|
||||
]"
|
||||
/>
|
||||
|
||||
<q-select
|
||||
outlined
|
||||
clearable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue