From 0ab9475a10f905a5d3d95a884b55cf925d5c3ef8 Mon Sep 17 00:00:00 2001 From: les Date: Wed, 7 Oct 2020 10:09:00 +0200 Subject: [PATCH] add field name in required validator --- plugins/validators.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/validators.js b/plugins/validators.js index 68625e56..f460bfb1 100644 --- a/plugins/validators.js +++ b/plugins/validators.js @@ -4,7 +4,7 @@ export default ({ app }, inject) => { const $t = app.i18n.t.bind(app.i18n) const validators = { required (fieldName) { - return value => !!value || $t('validators.required', { fieldName }) + return value => !!value || $t('validators.required', { fieldName: $t(fieldName) }) }, email: [ v => !!v || $t('validators.required', { fieldName: $t('common.email') }),