mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Replaced hardcoded translation in shared input validator
no issue - re-use existing keys
This commit is contained in:
parent
812e533554
commit
ccd9541f75
1 changed files with 4 additions and 1 deletions
|
@ -30,7 +30,10 @@ const validate = (config, attrs) => {
|
||||||
_.each(config, (value, key) => {
|
_.each(config, (value, key) => {
|
||||||
if (value.required && !attrs[key]) {
|
if (value.required && !attrs[key]) {
|
||||||
errors.push(new common.errors.ValidationError({
|
errors.push(new common.errors.ValidationError({
|
||||||
message: `${key} is required.`
|
message: common.i18n.t('notices.data.validation.index.validationFailed', {
|
||||||
|
validationName: 'FieldIsRequired',
|
||||||
|
key: key
|
||||||
|
})
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue