kazupon / vue-validator

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

Group Example: values #335

Open heygambo opened 7 years ago

heygambo commented 7 years ago

vue & vue-validator version

2.0.3, alpha.1

In this example: https://github.com/vuejs/vue-validator/blob/b5136d8aea547058b9480b874957061fc38ec9b0/examples/group/index.html

How would you access the actual value of the inputs?

kazupon commented 7 years ago

You can access with event args of input event handler. e.g.

handleValidate (e) {
  const value = e.target.value
  ...
}
heygambo commented 7 years ago

But I cannot combine that with v-model, right?

I've tried that but then the browser crashed and I had to kill it the hard way.

woshi82 commented 7 years ago

@kazupon the way you show to get value is not elastic, 1、must i bind input event to every form input to get its value?
2、it seem like only bind @input | @change event can activate the validators?