kazupon / vue-validator

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

$validate( [field], [touched], [cb] ) #308

Closed MSidabras closed 7 years ago

MSidabras commented 7 years ago

Hi, I can't find any example of how to use this function when I want to validate one field. Could anyone show how I need to write field argument?

And one more thing, could this function target one form object? I have two forms in single page, and when I use this function, the last one gets validated only. Could there be one more argument for form validator name to target only it?

vue & vue-validator version

1.0.26, 2.0.0

kazupon commented 7 years ago

Sorry poor documentation...

Hi, I can't find any example of how to use this function when I want to validate one field. Could anyone show how I need to write field argument?

Maybe, this test codes might be to help for you. https://github.com/vuejs/vue-validator/blob/2.x/test/specs/validate.js

could this function target one form object? I have two forms in single page, and when I use this function, the last one gets validated only. Could there be one more argument for form validator name to target only it?

Related #220 I'll support at v3.0