Skip to content

Commit

Permalink
Replaced hardcoded translation in shared input validator
Browse files Browse the repository at this point in the history
no issue

- re-use existing keys
  • Loading branch information
kirrg001 committed Dec 10, 2018
1 parent 812e533 commit ccd9541
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/server/api/shared/validators/input/all.js
Expand Up @@ -30,7 +30,10 @@ const validate = (config, attrs) => {
_.each(config, (value, key) => {
if (value.required && !attrs[key]) {
errors.push(new common.errors.ValidationError({
message: `${key} is required.`
message: common.i18n.t('notices.data.validation.index.validationFailed', {
validationName: 'FieldIsRequired',
key: key
})
}));
}
});
Expand Down

0 comments on commit ccd9541

Please sign in to comment.