How to use the vee-validate/dist/locale/en.json.messages function in vee-validate

To help you get started, we’ve selected a few vee-validate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nordic-institute / X-Road / src / proxy-ui-api / frontend / src / i18n.ts View on Github external
import Vue from 'vue';
import VueI18n from 'vue-i18n';
import en from 'vee-validate/dist/locale/en.json';

Vue.use(VueI18n);

import locals from './locales/en.json';
(locals as any).validation = en.messages;

export default new VueI18n({
  locale: process.env.VUE_APP_I18N_LOCALE || 'en',
  fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',
  silentFallbackWarn: true,
  messages: {
    en: locals,
  },
});