refactor: hq abbrev rule
This commit is contained in:
parent
bcc27580b9
commit
b617acfc38
1 changed files with 5 additions and 2 deletions
|
|
@ -55,9 +55,12 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
|
|||
for="input-abbreviation"
|
||||
:model-value="view ? formatCode(abbreviation, 'code') : abbreviation"
|
||||
:rules="[
|
||||
(val) => (val && val.length > 0) || $t('form.error.required'),
|
||||
(val) =>
|
||||
(val && val.length > 0 && /^[a-zA-Z]+$/.test(val)) ||
|
||||
$t('form.error.invalid'),
|
||||
$t('form.error.invalidCustomeMessage', {
|
||||
msg: $t('form.error.letterOnly'),
|
||||
}),
|
||||
]"
|
||||
@update:model-value="(v) => (abbreviation = v as string)"
|
||||
/>
|
||||
|
|
@ -86,7 +89,7 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
|
|||
|
||||
<!-- view ? `${formatCode(code, 'number')}${branchCount}` : code -->
|
||||
<!-- <q-input
|
||||
|
||||
|
||||
v-if="typeBranch !== 'headOffice'"
|
||||
:dense="dense"
|
||||
outlined
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue