0

On this page https://bootstrap-vue.js.org/docs/reference/validation/ of the documentation of bootstrap-vue, they are giving an example of how to use vee-validate.

However, their example doesn't work for me, because i get a warning saying [vee-validate] A field is missing a "name" or "data-vv-name" attribute. In deed, there is no name or data-vv-name attribute in their example and after adding one of them, it works like a charm.

Is this example outdated / wrong?

Anthony Aslangul
  • 3,589
  • 2
  • 20
  • 30

1 Answers1

1
<b-form-input id="example-input-1" v-model="form.name" v-validate="{ required: true, min:2 }":state="validateState('form.name')" aria-describedby="input-1-live-feedback" placeholder="Enter name"enter code here></b-form-input>

The documentation has been updated to require name attribute and not v-model binding.

<input v-validate="'required|email'" type="email" name="email">

So Yes. this needs to be updated

ekpono
  • 172
  • 4
  • 1
    Ok that was i thinking, as i'm currently learning vue and its ecosystem, this is the kind of thing that put a question mark over my head :) ty – Anthony Aslangul Apr 25 '19 at 07:54