davestewart / vee-element

Replaces Element UI's validation engine with Vee Validate
http://vee-element.netlify.com
MIT License
73 stars 8 forks source link

$validator not available #13

Open JamesCrann opened 5 years ago

JamesCrann commented 5 years ago

Versions

Issue Description

Usually when using Vue.use(VeeValidate);, $validator is available, however when follwong the example provided in the vee-element README.md (https://github.com/davestewart/vee-element) which does not explicitly use Vue.use(VeeValidate);, $validator it not then available

const validator = new VeeValidate.Validator()
// use plugins
Vue.use(VeeElement, validator) ;

If Vue.use(VeeValidate); is additionally added, errors are thrown because it appears its being registered twice

The computed property "fields" is already defined in data.

Could you please suggest how VeeElement can be configured and still have $validator available?

Demo link Example can be found here : https://codesandbox.io/s/0y39x5owyw

Steps to reproduce

Cannot read property 'validate' of undefined"

Desktop

Stenfrank commented 4 years ago

There is still the same problem