Created
May 27, 2020 15:58
-
-
Save fabiofdsantos/8f67264377a6d1e534c573647f1623e9 to your computer and use it in GitHub Desktop.
vee-validate: set custom error to validation provider #Vue.js #TypeScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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