From 7c575098d5c86d5f3580a3c4f89588aca31bc07f Mon Sep 17 00:00:00 2001 From: Samuel Young Date: Mon, 2 Feb 2026 10:10:45 +0000 Subject: [PATCH] CLDC-4190: Remove other validations on referral fields --- .../bulk_upload/lettings/year2026/row_parser.rb | 14 -------------- .../validations/lettings/2026/bulk_upload.en.yml | 2 -- 2 files changed, 16 deletions(-) diff --git a/app/services/bulk_upload/lettings/year2026/row_parser.rb b/app/services/bulk_upload/lettings/year2026/row_parser.rb index 97da93d47..177a69d30 100644 --- a/app/services/bulk_upload/lettings/year2026/row_parser.rb +++ b/app/services/bulk_upload/lettings/year2026/row_parser.rb @@ -414,8 +414,6 @@ class BulkUpload::Lettings::Year2026::RowParser validate :validate_needs_type_present, on: :after_log validate :validate_data_types, on: :after_log validate :validate_relevant_collection_window, on: :after_log - validate :validate_la_with_local_housing_referral, on: :after_log - validate :validate_cannot_be_la_referral_if_general_needs_and_la, on: :after_log validate :validate_leaving_reason_for_renewal, on: :after_log validate :validate_only_one_housing_needs_type, on: :after_log validate :validate_no_disabled_needs_conjunction, on: :after_log @@ -805,18 +803,6 @@ private field_4 == 2 end - def validate_cannot_be_la_referral_if_general_needs_and_la - if field_116 == 4 && general_needs? && owning_organisation && owning_organisation.la? - errors.add :field_116, I18n.t("#{ERROR_BASE_KEY}.referral.general_needs_prp_referred_by_la") - end - end - - def validate_la_with_local_housing_referral - if field_116 == 3 && owning_organisation && owning_organisation.la? - errors.add(:field_116, I18n.t("#{ERROR_BASE_KEY}.referral.nominated_by_local_ha_but_la")) - end - end - def validate_relevant_collection_window return if startdate.blank? || bulk_upload.form.blank? diff --git a/config/locales/validations/lettings/2026/bulk_upload.en.yml b/config/locales/validations/lettings/2026/bulk_upload.en.yml index b8257c8fb..bf65ae6bd 100644 --- a/config/locales/validations/lettings/2026/bulk_upload.en.yml +++ b/config/locales/validations/lettings/2026/bulk_upload.en.yml @@ -40,8 +40,6 @@ en: reason: renewal_reason_needed: "The reason for leaving must be \"End of social or private sector tenancy - no fault\", \"End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)\", \"End of social or private sector tenancy - evicted due to rent arrears\" or \"End of social or private sector tenancy - evicted for any other reason\"." referral: - general_needs_prp_referred_by_la: "The source of the referral cannot be referred by local authority housing department for a general needs log." - nominated_by_local_ha_but_la: "The source of the referral cannot be Nominated by local housing authority as your organisation is a local authority." invalid_option: "Your answers for each part of \"What is the source of referral for this letting?\" are incompatible with each other. Use the bulk upload specification or paper form to see which combinations are valid (available from ‘Collection resources’ on the homepage)." scheme: must_relate_to_org: "This scheme code does not belong to the owning organisation or managing organisation."