refactor: handle nrcNO not required
This commit is contained in:
parent
5f6cdf2fce
commit
d072ed015a
1 changed files with 3 additions and 2 deletions
|
|
@ -297,11 +297,12 @@ defineEmits<{
|
|||
:readonly="readonly"
|
||||
class="col-6"
|
||||
:label="$t('customerEmployee.form.nrcNo')"
|
||||
:model-value="readonly ? nrcNo || '-' : nrcNo"
|
||||
:model-value="nrcNo"
|
||||
@update:model-value="(v) => (typeof v === 'string' ? (nrcNo = v) : '')"
|
||||
:rules="[
|
||||
(val) =>
|
||||
(val && val.length === 13 && /[0-9]+/.test(val)) ||
|
||||
!val ||
|
||||
val.length === 13 ||
|
||||
$t('form.error.invalidCustomeMessage', {
|
||||
msg: $t('form.error.requireLength', { msg: 13 }),
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue