From 93e392fac108a515ff1c33400ce45a81ae675166 Mon Sep 17 00:00:00 2001 From: "Fabien \"egg\" O'Carroll" Date: Thu, 20 Oct 2022 11:50:23 +0700 Subject: [PATCH] Added error messages for monthly & yearly price validation refs https://github.com/TryGhost/Team/issues/2078 These were missing, and will be refactored into the correct tpl(messages.prop) format --- ghost/tiers/lib/Tier.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ghost/tiers/lib/Tier.js b/ghost/tiers/lib/Tier.js index c58f0bbede..924bcb56a1 100644 --- a/ghost/tiers/lib/Tier.js +++ b/ghost/tiers/lib/Tier.js @@ -350,17 +350,17 @@ function validateMonthlyPrice(value, type) { } if (!Number.isSafeInteger(value)) { throw new ValidationError({ - message: '' + message: 'Tier prices must be an integer.' }); } if (value < 0) { throw new ValidationError({ - message: '' + message: 'Tier prices must not be negative' }); } if (value > 9999999999) { throw new ValidationError({ - message: '' + message: 'Tier prices may not exceed 999999.99' }); } return value; @@ -377,17 +377,17 @@ function validateYearlyPrice(value, type) { } if (!Number.isSafeInteger(value)) { throw new ValidationError({ - message: '' + message: 'Tier prices must be an integer.' }); } if (value < 0) { throw new ValidationError({ - message: '' + message: 'Tier prices must not be negative' }); } if (value > 9999999999) { throw new ValidationError({ - message: '' + message: 'Tier prices may not exceed 999999.99' }); } return value;