Translation

This plugin only comes with English messages to keep things small, but it was built with flexible message generation in mind.
The English messages file is an example on how you would structure those messages. Then you may want to update the validator dictionary, which should happen once in your app startup. still you may update them whenever you want in any point of your app, review the custom messages here.

Here is a little code example on how would you add support for your localized messages. Note that this is the entry point of your application.

import Vue from 'vue'; import VeeValidate from 'vee-validate'; import messages from './strings/validator/ar.js'; // Pass options to make all validators use the arabic language. // You can still modify each validator locale indvidually via the 'setLocale' on the validator instance. Vue.use(VeeValidate, { locale: 'ar', messages: { ar: messages } }); new Vue({ el: '#app', data: { // Some Data ... }, methods { // Cool methods ... } });

Note: You can still modify the default language for each validator individually via the setLocale method on the validator instance. And you can also switch the language for all future validators (not created yet) via the setDefaultLocale static method on the Validator class.

A working example can be found here.

Localized Files

In the dist/locale directory of this plugin, is a collection of localized files, mainly the English, The Arabic and the Spanish languages. If you can't find your locale, you could help this plugin by contributing a localized version to the repo. I will happily accept it.

Available Locales: