Vee-validate: Validator with scope throws Uncaught (in promise)

Created on 26 Jan 2017  路  2Comments  路  Source: logaretm/vee-validate

Versions:

Description:

When validating with a scope set it will throw an error 'examples#scope-example:1 Uncaught (in promise) e {msg: "[vee-validate]: Validation Failed"}'

Steps To Reproduce:

this.$validator.validateAll('form-1')

This also happens in the example on http://vee-validate.logaretm.com/examples#scope-example

Most helpful comment

this is intended, as of beta.19 you should be catching the promise, the promise rejects only if the validation fails so you should do this:

this.$validator.validateAll().then(() => {
 // success stuff
}).catch(() => {
// fail stuff
});

Which makes it more consistent to use with other APIs

All 2 comments

this is intended, as of beta.19 you should be catching the promise, the promise rejects only if the validation fails so you should do this:

this.$validator.validateAll().then(() => {
 // success stuff
}).catch(() => {
// fail stuff
});

Which makes it more consistent to use with other APIs

Awesome, that works!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kidox picture kidox  路  3Comments

7immer picture 7immer  路  3Comments

MaxMilton picture MaxMilton  路  3Comments

yyyuuu777 picture yyyuuu777  路  3Comments

Etheryte picture Etheryte  路  3Comments