Here's my method:
async sendEmail() {
this.isActive = true
this.$validator.validate().then(result => {
if (result) {
await axios.post('url', data)
this.isActive = false
}
})
}
I'm showing the loader when isActive = true
, but using await
inside this.$validator
throw me an error about word await
is reserved. For validation i use VeeValidate
How can i use await inside $validator
promise?