kazupon / vue-validator

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

Using dot-notation syntax for v-validate field names #286

Closed v-petukhov closed 8 years ago

v-petukhov commented 8 years ago

Hi there!

Maybe it is bug or feature, i don't even know.

But, here is description of a problem.

If I use initial="off" directive and 'dot notation' syntax for v-validate field name, validation runs over last validation element only. But, if I'll change dots in v-validate field name for '-' -- all gonna be ok.

Here is fiddle for example: http://jsfiddle.net/d2tmqrzr/

kazupon commented 8 years ago

vue-validator don't support field like object path. (e.g. v-validate:user.name) you need to use simple field name or kebab-case (e.g. user-name)