refactor: add mask at input nrc
This commit is contained in:
parent
bd3054fa59
commit
a37b0726d7
1 changed files with 8 additions and 0 deletions
|
|
@ -287,6 +287,7 @@ defineEmits<{
|
|||
<q-input
|
||||
:for="`${prefixId}-input-nrc-no`"
|
||||
:dense="dense"
|
||||
mask="#############"
|
||||
outlined
|
||||
hide-bottom-space
|
||||
:readonly="readonly"
|
||||
|
|
@ -294,6 +295,13 @@ defineEmits<{
|
|||
:label="$t('customerEmployee.form.nrcNo')"
|
||||
:model-value="readonly ? nrcNo || '-' : nrcNo"
|
||||
@update:model-value="(v) => (typeof v === 'string' ? (nrcNo = v) : '')"
|
||||
:rules="[
|
||||
(val) =>
|
||||
(val && val.length === 13 && /[0-9]+/.test(val)) ||
|
||||
$t('form.error.invalidCustomeMessage', {
|
||||
msg: $t('form.error.requireLength', { msg: 13 }),
|
||||
}),
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue