Closed afwn90cj93201nixr2e1re closed 5 years ago
function getI18nAttribute (attributes, fieldName) {
var normalizedName = fieldName.replace(NORMALIZE_ATTR_REGEX, '');
return this.$t(((this.$vuelidateErrorExtractor.i18nAttributes)+ "." + normalizedName));
}
Use like:
import i18n from './i18n'
import Vuelidate from "vuelidate";
import VuelidateErrorExtractor, { templates } from "vuelidate-error-extractor";
Vue.use(Vuelidate);
Vue.component("formWrapper", templates.FormWrapper);
Vue.use(VuelidateErrorExtractor, {
templates,
i18n:'validation',//json key from translation file
i18nAttributes:'attributes',//don't know what shit is it
messages:i18n.messages,//i18n.messages pointer
});
new Vue({
router,
store,
validations: {},
i18n,
render: h => h(App)
}).$mount('#app');
Fix.
./del