kazupon / vue-validator

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

多表单验证情况下,全局方法如$validate, $resetValidation只作用于最后一个表单 #311

Closed dai-siki closed 7 years ago

dai-siki commented 7 years ago

vue & vue-validator version

1.0.26, 2.1.5

作者您好,非常感谢提供这么棒的验证工具,现在做的项目正在使用。很抱歉英文水平不好,无法准确地描述问题,所以使用中文。 我遇到的问题是,在一个页面存在多个表单验证的情况下,插件绑定到vue的全局方法如$validate, $resetValidation只作用于其中某个表单(应该是页面最后一个),请问有可以多个表单同时验证的方法吗?(或者指定其中某个表单)我翻看文档找了很久没有找到方法,唯一能想到的是创建多个vue实例,但是多表单数据之间存在交互,这种方法也无法实现。因此前来请教您,再次感谢

kazupon commented 7 years ago

sorry, can you report with english please?

dai-siki commented 7 years ago

I'm sorry, my english is poor, so I started with chinese, ok, I try.

hello, kazupon! Thank you very much for you support this so beautiful validation tools, I‘m using it on my current projects.

And now, I encountered a problem, when a page exist multiple forms need to validate, global method of vue-validator plugin such as '$validate' and '$resetValidation' only be effective in the last form, I would like to ask, have a way to validate multiple forms? or, I can specify a form.

this is my question, thanks!

kazupon commented 7 years ago

related #220

I'll try to improve this problem at v3.