Hi, I'm having some trouble with vee-validate.. with select2 plugin from wrapper component..
no error were found in console, but the validation is not working.
Link source from : https://vuejs.org/v2/examples/select2.html
Any help would be much appreciated.. Thanks.
note: I've tried vue-select by sagalbot before and it's working greatly with vee-validate, but it's not really flexible as i thought, so i changed it back to select2 jquery..
This code is not working : (using select2)
<select2 name="user" data-vv-name="user" v-validate="'required'" :options="options" v-model="selected">
</select2>
<span v-show="errors.has('user')" class="help is-danger">{{ errors.first('user') }}</span>
This code is working : (using vue-select)
<v-select name="user" data-vv-name="user" v-validate="'required'" v-model="selected" :options="options"></v-select>
<span v-show="errors.has('user')" class="help is-danger">{{ errors.first('user') }}</span>
I guess it has to do with emitted events, I will take a look when I can.
Here you go, sorry it took some time:
I used the official select2 example and extended upon it:
https://jsfiddle.net/logaretm/fruqrvdL/831/
Note that I applied a data-vv-name attribute and the directive v-validate on the component in the demo template and not the component template.
Hi, thanks for the effort. I've solved mine also by yesterday, and came up with the same solution as yours, it's working great. Have a good day Sir. 👍
hello how to solved. pls share.
Hi, how did you solve the problem with your custom wrapper ?
Hi, how did you solve the problem with your custom wrapper ?
how I manage using vue-bootstrap
https://gist.github.com/tsulatsitamim/a073d159bd715d13a5b18497e22a02af
it support ajax or local data by providing url or items props
Most helpful comment
Here you go, sorry it took some time:
I used the official select2 example and extended upon it:
https://jsfiddle.net/logaretm/fruqrvdL/831/
Note that I applied a
data-vv-nameattribute and the directivev-validateon the component in the demo template and not the component template.