Answer the question
In order to leave comments, you need to log in
Why doesn't the minmax character validation work in the vee-validate library?
I add the following validation setting to main.ls
extend('minmax', {
validate(value, { min, max }) {
return value. length >= min && value. length <= max;
},
params: ['min', 'max'],
message: 'The field must be at least {min} characters and at most {max} characters'
});
Validation works, but an error is written to the console.
main.js:2 Uncaught (in promise) TypeError: Cannot read property 'length' of undefined
How to overcome this problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question