Browse Source

feat: add error messages on property postcode page as well as la page

pull/959/head
natdeanlewissoftwire 3 years ago
parent
commit
372c1ae28b
  1. 2
      app/models/validations/financial_validations.rb
  2. 3
      config/locales/en.yml

2
app/models/validations/financial_validations.rb

@ -192,6 +192,7 @@ private
record.errors.add :brent, I18n.t("validations.financial.brent.below_hard_min") record.errors.add :brent, I18n.t("validations.financial.brent.below_hard_min")
record.errors.add :beds, I18n.t("validations.financial.brent.beds.below_hard_min") record.errors.add :beds, I18n.t("validations.financial.brent.beds.below_hard_min")
record.errors.add :la, I18n.t("validations.financial.brent.la.below_hard_min") record.errors.add :la, I18n.t("validations.financial.brent.la.below_hard_min")
record.errors.add :postcode_known, I18n.t("validations.financial.brent.postcode_known.below_hard_min")
record.errors.add :rent_type, I18n.t("validations.financial.brent.rent_type.below_hard_min") record.errors.add :rent_type, I18n.t("validations.financial.brent.rent_type.below_hard_min")
record.errors.add :needstype, I18n.t("validations.financial.brent.needstype.below_hard_min") record.errors.add :needstype, I18n.t("validations.financial.brent.needstype.below_hard_min")
record.errors.add :period, I18n.t("validations.financial.brent.period.below_hard_min") record.errors.add :period, I18n.t("validations.financial.brent.period.below_hard_min")
@ -199,6 +200,7 @@ private
record.errors.add :brent, I18n.t("validations.financial.brent.above_hard_max") record.errors.add :brent, I18n.t("validations.financial.brent.above_hard_max")
record.errors.add :beds, I18n.t("validations.financial.brent.beds.above_hard_max") record.errors.add :beds, I18n.t("validations.financial.brent.beds.above_hard_max")
record.errors.add :la, I18n.t("validations.financial.brent.la.above_hard_max") record.errors.add :la, I18n.t("validations.financial.brent.la.above_hard_max")
record.errors.add :postcode_known, I18n.t("validations.financial.brent.postcode_known.above_hard_max")
record.errors.add :rent_type, I18n.t("validations.financial.brent.rent_type.above_hard_max") record.errors.add :rent_type, I18n.t("validations.financial.brent.rent_type.above_hard_max")
record.errors.add :needstype, I18n.t("validations.financial.brent.needstype.above_hard_max") record.errors.add :needstype, I18n.t("validations.financial.brent.needstype.above_hard_max")
record.errors.add :period, I18n.t("validations.financial.brent.period.above_hard_max") record.errors.add :period, I18n.t("validations.financial.brent.period.above_hard_max")

3
config/locales/en.yml

@ -190,6 +190,9 @@ en:
brent: brent:
below_hard_min: "Rent is below the absolute minimum expected for a property of this type. Please check the rent, rent period, local authority and (if general needs) number of bedrooms" below_hard_min: "Rent is below the absolute minimum expected for a property of this type. Please check the rent, rent period, local authority and (if general needs) number of bedrooms"
above_hard_max: "Rent is higher than the absolute maximum expected for a property of this type. Please check the rent, rent period, local authority and (if general needs) number of bedrooms" above_hard_max: "Rent is higher than the absolute maximum expected for a property of this type. Please check the rent, rent period, local authority and (if general needs) number of bedrooms"
postcode_known:
below_hard_min: "Rent is below the absolute minimum expected for a property of this type. Please check the rent, rent period, local authority and number of bedrooms"
above_hard_max: "Rent is higher than the absolute maximum expected for a property of this type. Please check the rent, rent period, local authority and number of bedrooms"
la: la:
below_hard_min: "Rent is below the absolute minimum expected for a property of this type based on this local authority" below_hard_min: "Rent is below the absolute minimum expected for a property of this type based on this local authority"
above_hard_max: "Rent is higher than the absolute maximum expected for a property of this type based on this local authority" above_hard_max: "Rent is higher than the absolute maximum expected for a property of this type based on this local authority"

Loading…
Cancel
Save