fix: refs #8638 update null check for maxlength validation in VnInput.vue
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
eb6046f338
commit
c5e1ebec82
|
@ -84,7 +84,7 @@ const mixinRules = [
|
|||
...($attrs.rules ?? []),
|
||||
(val) => {
|
||||
const maxlength = $props.maxlength;
|
||||
if (maxlength && +val.length > maxlength)
|
||||
if (maxlength && +val?.length > maxlength)
|
||||
return t(`maxLength`, { value: maxlength });
|
||||
const { min, max } = vnInputRef.value.$attrs;
|
||||
if (!min) return null;
|
||||
|
|
Loading…
Reference in New Issue