kazupon / vue-validator

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

validator lower-cases camelCase v-models #282

Closed jaredreich closed 8 years ago

jaredreich commented 8 years ago

vue & vue-validator version: 1.0.21, 2.1.3

for example, within the template you are using:

v-model="dateFull"
v-validate:dateFull="{
  required: true
}"

then later in your methods, you try

this.$validator.dateFull

it will not work, but

this.$validator.datefull

will work... this can't be the desired behaviour?

kazupon commented 8 years ago

You can use the kebab-case in directive of HTML template. (This is HTML specification.) See the detail: http://vuejs.github.io/vue-validator/en/syntax.html#camelcase-property

jaredreich commented 8 years ago

thank you, sorry never saw this in the docs.