Skip to content

Instantly share code, notes, and snippets.

@fabiofdsantos
Created May 27, 2020 15:58
Show Gist options
  • Save fabiofdsantos/8f67264377a6d1e534c573647f1623e9 to your computer and use it in GitHub Desktop.
Save fabiofdsantos/8f67264377a6d1e534c573647f1623e9 to your computer and use it in GitHub Desktop.
vee-validate: set custom error to validation provider #Vue.js #TypeScript
setError(msg: string): void {
const provider = this.$refs.provider as InstanceType<
typeof ValidationProvider
>
provider.applyResult({
errors: [msg],
failedRules: {},
})
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment