kazupon / vue-validator

:white_check_mark: Validator component for Vue.js
MIT License
2.19k stars 431 forks source link

Uncaught TypeError: Cannot read property 'invalid' of undefined #340

Closed shinygang closed 7 years ago

shinygang commented 8 years ago

vue & vue-validator version

2.0.3, 3.0.0-alpha.1

Reproduction Link

https://jsfiddle.net/7kzcgy3p/

What is Expected?

error

What is actually happening?

Uncaught TypeError: Cannot read property 'invalid' of undefined

shinygang commented 8 years ago

the other question: 1、hao to activate the validation1 validate in my js code. which method? 2、when will the V3‘s document be released?

farrance commented 8 years ago

I'm having the same issue.

kazupon commented 8 years ago

Thank you for your feedback. I seem that is bug ... I'll try to fix next release.

Sorry, I'm busy hard to work ... Please wait :bow:

mesis commented 8 years ago

I'm having the same issue here.

maxKimoby commented 8 years ago

The bug makes the plugin unusable when there are more than a single validity tag, so generally unusable. It seems that only the first validity element is processed. I know that because I put a watch on $validation.myValidator and when it changes from undefined to something, it only contains the first validity element.

Really needs documentation and a quick and functional release for 2.0, this is really annoying for people upgrading from 1.x that were using the previous VueValidator release (which was marvelous).

Edit : The plugin seems to be functional even though the error still persists. But something throwing an error is never functional for a good programmer.

hxd520love commented 8 years ago

image image 一开始会有三个undefined,然后才是对的。而且按照文档写的,请大大查看