() =>is the syntax for defining a function in ES6 , therefore for converting the vee-validate syntax to older Javascript.
therefore from the documentation :
alpha: () => 'Some English Message'
will be equivalent
alpha: function() {
return 'Some English Message'
}
Similarly, you must make the following changes:
<script>
const messages = {
en: {
confirmed: function () {
return "Your password is not confirmed"
},
email: function () {
return "I really dont like your email"
}
}
};
Vue.use(VeeValidate);
var app = new Vue({
el: '#app'
});
app.$validator.updateDictionary(messages);
</script>
. vee-validate:
<script>
const dictionary = {
en: {
messages: {
confirmed: function () {
return "Your password is not confirmed"
},
email: function () {
return "I really dont like your email"
}
}
}
};
VeeValidate.Validator.updateDictionary(dictionary);
Vue.use(VeeValidate);
Vue.config.debug = true;
var App = new Vue({
el: '#app'
});
</script>
fiddle.