__isVuelidateAsyncVm' of undefined...
See original GitHub issueHi there,
I’m stuck to version 0.2.0
!
Version 0.3.0 introduced lots of changes and I have lots of forms tied to vuelidate (thank you for such a great module btw).
If I upgrade to >= 0.3.0
I have one of my form that throw:
[Vue warn]: Error in render function: "TypeError: Cannot read property '__isVuelidateAsyncVm' of undefined"
at VueComponent.$pending (index.js?112c:249)
at Watcher.get (vue.runtime.esm.js?ff9b:2877)
at Watcher.evaluate (vue.runtime.esm.js?ff9b:2984)
at VueComponent.computedGetter [as $pending] (vue.runtime.esm.js?ff9b:3261)
at eval (index.js?112c:96)
at Array.some (<anonymous>)
at VueComponent.$pending (index.js?112c:95)
at Watcher.get (vue.runtime.esm.js?ff9b:2877)
at Watcher.evaluate (vue.runtime.esm.js?ff9b:2984)
at VueComponent.computedGetter [as $pending] (vue.runtime.esm.js?ff9b:3261)
…tough to debug!
What is __isVuelidateAsyncVm
, what does it mean?
If I just add <pre>{{ $v }}</pre>
it trigger the error on a untouched form where the error still don’t occur yet.
Thanks for help!
(sorry very difficult to fiddle this one)
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Cannot read property '__isVuelidateAsyncVm' of undefined
But for some reason, I'm getting the error Cannot read property '__isVuelidateAsyncVm' of undefined . javascript · vue.js · vuetify.js ...
Read more >Cannot read property '__isVuelidateAsyncVm' of undefined ...
[Solved]-Cannot read property '__isVuelidateAsyncVm' of undefined-Vue.js. Search. score:4. Accepted answer. First some comments, it's great that you have ...
Read more >Cannot read property '__isVuelidateAsyncVm' of undefined
Cannot read property '__isVuelidateAsyncVm' of undefined. Answer a question Here is the code I have codesandbox, What I have here is a form ......
Read more >Cannot read property '$model' of undefined - Vuelidate
Your validations object is missing a level key. I'm not familiar with this library but that could be it?
Read more >vue.js - vuelidate, how to make a custom check? - CompuTicket
But when using V-if = "! $ v.form.phone.isphone" Error crashes: Error in Render: "TypeRerror: Cannot Read Property '__ISVuelidateAsyncvm' of undefined" . Who ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Great! Got it in 5 minutes this time, thanks very much again! A custom validator function wasn’t returning any bool if
value == null
… classic I guess.Could you show your validation config or ideally create a reproduction on the fiddle? The
__isVuelidateAsyncVm
is an internal property to decide if certain validation is asynchronous. It’s an implementation detail and you should not rely on it in any way in your code. Anyhow, it says it’s accessed on undefined, which happens here https://github.com/monterail/vuelidate/blob/5e5436455972bd0456b8ae5da001ad8d4ba78e41/src/index.js#L222-L235This whole method is really a computed value, so it’s computed when you access it. Printing
$v
accesses everything, forcing the whole vuelidate model to recompute instantly.The
run.output
is undefined. That means therun
computed value returns a bad value. Internally it usesrunRule
to compute the output based on provided config. https://github.com/monterail/vuelidate/blob/5e5436455972bd0456b8ae5da001ad8d4ba78e41/src/index.js#L167-L184It’s the output of your validation rule, which returns undefined for some reason.
It is certainly an error of your configuration, though I never specified anywhere that this behaviour (returning undefined) is illegal. I do say that it should be a boolean on a promise though.
I’d like to preserve
undefined
as illegal, but in development mode an error to the console could be reported and the value treated like being valid. That means there is work to do on both ends 😉 On your side, just make sure that your validators doesn’t return undefined and you are free to upgrade.