After update vee-validate I get error Uncaught Error: [vee-validate] Extension Error: The validator 'login' object must have a 'getMessage' method or string.
Validator.extend('login', {
messages: {
en() {
return en.translation.userNotExistCredentials;
},
he() {
return he.translation.userNotExistCredentials;
},
},
async validate(value) {
return {
valid: value !== 0,
};
},
});
If I add getMessage, it's works, but object messages ignores.
Validator.extend('login', {
messages: {
en() {
return en.translation.userNotExistCredentials;
},
he() {
return he.translation.userNotExistCredentials;
},
},
async validate(value) {
return {
valid: value !== 0,
};
},
getMessage() {
return en.translation.userNotExistCredentials;
},
});
Sorry about that, we had a breaking change introduced in rc.26 with the introduction of vue-i18n support:
messages object will no longer be accepted in Validator.extend, you should use localize API from now on.
You should use Validator.localize to merge your messages instead.
I believe this shouldn't be closed until the documentation is corrected
docs have been updated, sorry about that.
Most helpful comment
I believe this shouldn't be closed until the documentation is corrected