How can I customize error messages in subscribe form?

#1

I customized my templates subscribe.hbs and subscribe_form.hbs and it’s ok. But I can’t customize error messages if there is incorrent email or blank email. I’ve tried locales json file, but no success. Then i found that this text is hardcoded in /Ghost/core/server/apps/subscribers/lib/router.js

if (_.isEmpty(req.body.email)) {
    return next(new common.errors.ValidationError({message: 'Email cannot be blank.'}));
} else if (!validator.isEmail(req.body.email)) {
    return next(new common.errors.ValidationError({message: 'Invalid email.'}));
}

does it mean that I can’t customize error messages?

closed #2

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.