mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
add field name in required validator
This commit is contained in:
parent
a4fbcaa2ad
commit
0ab9475a10
1 changed files with 1 additions and 1 deletions
|
@ -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') }),
|
||||
|
|
Loading…
Reference in a new issue