0

I am trying to get the Vuelidate custom validator provided by the docs to work with my Vutify

This is the line of code from the docs

const mustBeCool = (value) => value.indexOf('cool') >= 0

When I add it to my validators like so it doesnt seem to work

name: { required, minLength: minLength(4), mustBeCool }

Here is the CodePen

https://codepen.io/jamiebrs/pen/OKjXev?editors=1010

What am I missing?

Jamie
  • 428
  • 6
  • 24
  • 2
    I dont think this is the problem with your code, in your `nameErrors` computed property you have `this.$v.name.maxLength` instead of `this.$v.name.minLength`, otherwise it's working fine for me. – Chris Li Aug 02 '19 at 19:06
  • Yes that was the problem, dumb oversight on my part thanks. – Jamie Aug 02 '19 at 19:09

0 Answers0