问题
Hello I did a copy/paste from the vee-validate documentation into this codesandbox and I get no validation message - just the following error on the console:
[vue-i18n] Cannot translate the value of keypath 'validations.messages._default'. Use the value of keypath as default.
Is it a bug within vue-validate , vue-i18n, vuejs ? Or should one configurate it somehow different?
回答1:
you forgot to initialize i18n
After
const i18n = new VueI18n();
add this line
i18n.locale = "en";
this line tells i18n what the language it should look for, and merges all your translations (that you can have in a json file) with the veevalidator translations of the given language
来源:https://stackoverflow.com/questions/55045730/vue-i18n-integration-by-vee-validate-not-working-as-described-in-the-documentati