From 9dcbb0aec4445792f3bb5e1c6be5b62036a6b828 Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:57:10 +0100 Subject: [PATCH] Update financial validation rent range to skip bulk upload errors for scheme, location, rent type, and needstype (#3032) --- app/models/validations/financial_validations.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/models/validations/financial_validations.rb b/app/models/validations/financial_validations.rb index 652643fcf..7827fbb16 100644 --- a/app/models/validations/financial_validations.rb +++ b/app/models/validations/financial_validations.rb @@ -218,10 +218,10 @@ private record.errors.add :uprn, I18n.t("validations.lettings.financial.uprn.rent_below_hard_min") record.errors.add :la, I18n.t("validations.lettings.financial.la.rent_below_hard_min") record.errors.add :postcode_known, I18n.t("validations.lettings.financial.postcode_known.rent_below_hard_min") - record.errors.add :scheme_id, I18n.t("validations.lettings.financial.scheme_id.rent_below_hard_min") - record.errors.add :location_id, I18n.t("validations.lettings.financial.location_id.rent_below_hard_min") - record.errors.add :rent_type, I18n.t("validations.lettings.financial.rent_type.rent_below_hard_min") - record.errors.add :needstype, I18n.t("validations.lettings.financial.needstype.rent_below_hard_min") + record.errors.add :scheme_id, :skip_bu_error, message: I18n.t("validations.lettings.financial.scheme_id.rent_below_hard_min") + record.errors.add :location_id, :skip_bu_error, message: I18n.t("validations.lettings.financial.location_id.rent_below_hard_min") + record.errors.add :rent_type, :skip_bu_error, message: I18n.t("validations.lettings.financial.rent_type.rent_below_hard_min") + record.errors.add :needstype, :skip_bu_error, message: I18n.t("validations.lettings.financial.needstype.rent_below_hard_min") record.errors.add :period, I18n.t("validations.lettings.financial.period.rent_below_hard_min") end @@ -231,10 +231,10 @@ private record.errors.add :uprn, I18n.t("validations.lettings.financial.uprn.rent_above_hard_max") record.errors.add :la, I18n.t("validations.lettings.financial.la.rent_above_hard_max") record.errors.add :postcode_known, I18n.t("validations.lettings.financial.postcode_known.rent_above_hard_max") - record.errors.add :scheme_id, I18n.t("validations.lettings.financial.scheme_id.rent_above_hard_max") - record.errors.add :location_id, I18n.t("validations.lettings.financial.location_id.rent_above_hard_max") - record.errors.add :rent_type, I18n.t("validations.lettings.financial.rent_type.rent_above_hard_max") - record.errors.add :needstype, I18n.t("validations.lettings.financial.needstype.rent_above_hard_max") + record.errors.add :scheme_id, :skip_bu_error, message: I18n.t("validations.lettings.financial.scheme_id.rent_above_hard_max") + record.errors.add :location_id, :skip_bu_error, message: I18n.t("validations.lettings.financial.location_id.rent_above_hard_max") + record.errors.add :rent_type, :skip_bu_error, message: I18n.t("validations.lettings.financial.rent_type.rent_above_hard_max") + record.errors.add :needstype, :skip_bu_error, message: I18n.t("validations.lettings.financial.needstype.rent_above_hard_max") record.errors.add :period, I18n.t("validations.lettings.financial.period.rent_above_hard_max") end end