fix: branch => branch name rules
This commit is contained in:
parent
c4bdd18deb
commit
24a41868dd
3 changed files with 15 additions and 4 deletions
|
|
@ -126,8 +126,12 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
|
|||
: $t('branch.form.branchName')
|
||||
"
|
||||
v-model="name"
|
||||
:rules="[(val) => val && val.length > 0]"
|
||||
:error-message="$t('form.error.required')"
|
||||
:rules="[
|
||||
(val) => !!val || $t('form.error.required'),
|
||||
(val) =>
|
||||
/^[A-Za-z0-9ก-๙\s&.,'-]+$/.test(val) ||
|
||||
$t('form.error.branchNameField'),
|
||||
]"
|
||||
for="input-name"
|
||||
/>
|
||||
<q-input
|
||||
|
|
@ -145,7 +149,8 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
|
|||
:rules="[
|
||||
(val) => !!val || $t('form.error.required'),
|
||||
(val) =>
|
||||
/^[A-Za-z0-9\s.,]+$/.test(val) || $t('form.error.letterOnly'),
|
||||
/^[A-Za-z0-9\s&.,'-]+$/.test(val) ||
|
||||
$t('form.error.branchNameENField'),
|
||||
]"
|
||||
for="input-name-en"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue