diff --git a/src/components/03_customer-management/employee/BasicInformation.vue b/src/components/03_customer-management/employee/BasicInformation.vue index aac9a597..3ee3b2f8 100644 --- a/src/components/03_customer-management/employee/BasicInformation.vue +++ b/src/components/03_customer-management/employee/BasicInformation.vue @@ -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 }), }),