add field name in required validator
This commit is contained in:
@@ -4,7 +4,7 @@ export default ({ app }, inject) => {
|
|||||||
const $t = app.i18n.t.bind(app.i18n)
|
const $t = app.i18n.t.bind(app.i18n)
|
||||||
const validators = {
|
const validators = {
|
||||||
required (fieldName) {
|
required (fieldName) {
|
||||||
return value => !!value || $t('validators.required', { fieldName })
|
return value => !!value || $t('validators.required', { fieldName: $t(fieldName) })
|
||||||
},
|
},
|
||||||
email: [
|
email: [
|
||||||
v => !!v || $t('validators.required', { fieldName: $t('common.email') }),
|
v => !!v || $t('validators.required', { fieldName: $t('common.email') }),
|
||||||
|
|||||||
Reference in New Issue
Block a user