davestewart / vee-element

Replaces Element UI's validation engine with Vee Validate
http://vee-element.netlify.com
MIT License
73 stars 8 forks source link

Add runtime error message #36

Closed Stenfrank closed 4 years ago

Stenfrank commented 4 years ago

With "vee-validate" you can add error as follows but with "vee-element" it doesn't work:

this.$validator.errors.add({
    field: 'name',
    msg: 'The name already exists',
});
whoisarpit commented 4 years ago

Yes, this is not a supported functionality as the errorBag is not exposed on a per form item basis. (which is the only way really through which one could add new errors to that form item)

If the current code allows it, we can will the functionality. If you have any ideas please add a pull request :)