Is there a way change the fieldbag name , just like errorBag to avoid conflicts?
Currently vee-validate does not play well with https://github.com/ratiw/vue-table , because vue-table uses fields as a required prop.
Any help would be greatly appreciated 馃憤
There is already an option, it is just undocumented at this time. The below code should work:
const config = {
fieldBagName: 'fields', // change if property conflicts.
};
Vue.use(VeeValidate, config);
I tried updating to 2.0.0-beta.18 but the fieldBagName config does not seem to be working at the moment.
Its still conflicting with other dependencies.
Mayb that's the reason its undocumented.
try fieldsBagName it was misspelled in a couple of places, it was not documented because it does not work nicely with Vue 1.x versions.
@logaretm Works perfectly now! Thanks :)
Great, sorry about the confusion, I even misspelled it in the docs 馃槥
VeeValidate uses "fields" by default which causes a namespacing issue. To solve, it name their field anything else.... e.g. Naming it "veeValidateFields" fixed it for me.
const config = {
fieldBagName: 'veeValidateFields', // change if property conflicts.
};
Vue.use(VeeValidate, config);
Most helpful comment
try
fieldsBagNameit was misspelled in a couple of places, it was not documented because it does not work nicely with Vue 1.x versions.