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. }); Validator.extend("alpha_en_dash", { validate(value) { return /^[0-9A-Za-z\-\_]+$/.test(value); } });