我正在尝试更改vee-validate中的错误消息,但它不起作用...
有人知道该如何解决吗?
import VeeValidate from "vee-validate";
import hebrew from "vee-validate/dist/locale/he";
Vue.use(VeeValidate, {
locale: "he",
dictionary: {
he: { messages: hebrew }
}
});
谢谢!
答案 0 :(得分:2)
我终于找到了正确的方法
import VeeValidate, { Validator } from "vee-validate";
import he from "vee-validate/dist/locale/he";
Validator.localize({ he: he });
Vue.use(VeeValidate, { locale: "he" });