fix: validate hq abbreviation
This commit is contained in:
parent
637c503303
commit
c241d70c3c
3 changed files with 9 additions and 0 deletions
|
|
@ -58,6 +58,11 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
|
|||
:label="$t('formDialogHqAbbreviation')"
|
||||
for="input-abbreviation"
|
||||
:model-value="view ? formatCode(abbreviation, 'code') : abbreviation"
|
||||
:rules="[
|
||||
(val) =>
|
||||
(val && val.length > 0 && /[a-zA-Z]+/.test(val)) ||
|
||||
$t('formDialogInputHqAbbreviation'),
|
||||
]"
|
||||
@update:model-value="(v) => (abbreviation = v as string)"
|
||||
/>
|
||||
<q-input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue