You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
367 B
13 lines
367 B
import { Validator } from "vee-validate";
|
|
|
|
const isBetween = (value, { min, max } = {}) => {
|
|
return Number(min) <= value.length && Number(max) >= value.length;
|
|
};
|
|
|
|
// The first param is called 'min', and the second is called 'max'.
|
|
const paramNames = ['min', 'max'];
|
|
|
|
Validator.extend('digits_between', isBetween, {
|
|
paramNames // pass it in the extend options.
|
|
});
|