Vee-validate: validateAll(scope) breaks this.errors.has('fieldName')

Created on 13 Jun 2018  路  2Comments  路  Source: logaretm/vee-validate

Versions

  • vee-validate: v2.1.0-beta.1
  • vue: v2.5.16

Description
I have added error messages to each input using <label> that are shown using v-show = "errors.has('fieldName')". This works as expected, this.$validator.validateAll() makes the error messages visible if the field is not in a scope. But this doesn't work if the field is in a scope added using <form data-vv-scope = "scopeName"> and validated using this.$validator.validateAll('scopeName').

Reproduced here
https://jsfiddle.net/6sh0274c/32/

Desktop:

  • OS: Windows10
  • Browser: Chrome v-67.0.3396.79

Most helpful comment

has does not assume the scope, you have to explicitly specify it yourself, for example:

https://jsfiddle.net/6sh0274c/36/

Thanks for the clean example :)

All 2 comments

has does not assume the scope, you have to explicitly specify it yourself, for example:

https://jsfiddle.net/6sh0274c/36/

Thanks for the clean example :)

Thank you.

Was this page helpful?
0 / 5 - 0 ratings