-
Notifications
You must be signed in to change notification settings - Fork 431
bug: vm.$options, can not find asserts #188
Comments
Sorry, I cannot understand chinese... |
When use vue-validator work with vue-router, vue-router has to been loaded after vue-validator, otherwise will report error. I am not sure if there is the bug of vue or vue-validator, if not, please note in readme, vue-validator and vue-router have loading order dependency |
Thank you for your feedback 😺
Can you provide the reproduction codes with jsfiddle (or other) please? |
It's hard to reproduction in jsbin cause in browser env, router and validator will be auto installed. Vue.use(VueValidator)
Vue.use(CustomValidatorsPlugin)
Vue.use(Router)
//初始化router
const router = new Router({history: false })
setupRoute(router) //success Vue.use(Router)
Vue.use(VueValidator)
Vue.use(CustomValidatorsPlugin)
//初始化router
const router = new Router({history: false })
setupRoute(router) //success Vue.use(Router)
//初始化router
const router = new Router({history: false })
setupRoute(router)
Vue.use(VueValidator) //error |
Thank you for your great reporting!! Hmm, In my environment (commonjs), I could not confirm this issue... |
Related kazupon/vue-i18n#28 |
Actually i found that importing router instance from one file and installing vue-validator in another is causing error for me: Here's my setup: index.js - entry point
router.js
And with this setup i am getting error - (whole console log http://prntscr.com/axiijm) even if try to use vue-validator after router import (in any place inside index.js really). But when i move vue-validator to router.js, everything works as expected
Any idea why is this happening? |
In my enviroment, I reproduced this issue. This issue occured when execute |
Hi @kazupon I updated vue-validator to 2.1.0 and.. previous minlength bug is gone but unfortunately, I am still having some issues with vue-validator & vue-router working together, check this example: http://www.webpackbin.com/E1sjGml-W Console throws error when you try to open foo route:
But when you install vue-validator inside The docs says now:
but i start my app |
I checked your reproduction codes. import router from './router'
We must install it with |
All right. Understood. Thank you. |
@sqal If you could resolve this issue, please tell me. |
请修复BUG, 或者在 readme 中注明
谢谢
The text was updated successfully, but these errors were encountered: