vee-validate error object - _vm.errors is undefined

杀马特。学长 韩版系。学妹 提交于 2019-12-05 13:00:37

I had a sort alike issue but I am using these versions:

"vee-validate": "^2.0.0-rc.21", "vue": "^2.5.2",

and in that case you can access the errors collection using: this.$validator.error

see specs off vee-validate: http://vee-validate.logaretm.com/api.html#error-bag

scroll down and you see this:

Validator

The validator is injected to the Vue instance as $validator automatically. However it is also a standalone class and can be used separately for programmatically validating values. The constructor can optionally take an object to map each field name to a set of validations.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!