diff --git a/app/services/bulk_upload/lettings/year2023/row_parser.rb b/app/services/bulk_upload/lettings/year2023/row_parser.rb index 481b399dd..38f1ad2ee 100644 --- a/app/services/bulk_upload/lettings/year2023/row_parser.rb +++ b/app/services/bulk_upload/lettings/year2023/row_parser.rb @@ -284,7 +284,7 @@ class BulkUpload::Lettings::Year2023::RowParser validates :field_5, presence: { - message: I18n.t("validations.not_answered", question: "letting type"), + message: I18n.t("validations.not_answered", question: "letting type."), category: :setup, }, inclusion: { @@ -297,28 +297,28 @@ class BulkUpload::Lettings::Year2023::RowParser validates :field_6, presence: { - message: I18n.t("validations.not_answered", question: "property renewal"), + message: I18n.t("validations.not_answered", question: "property renewal."), category: :setup, }, on: :after_log validates :field_7, presence: { - message: I18n.t("validations.not_answered", question: "tenancy start date (day)"), + message: I18n.t("validations.not_answered", question: "tenancy start date (day)."), category: :setup, }, on: :after_log validates :field_8, presence: { - message: I18n.t("validations.not_answered", question: "tenancy start date (month)"), + message: I18n.t("validations.not_answered", question: "tenancy start date (month)."), category: :setup, }, on: :after_log validates :field_9, presence: { - message: I18n.t("validations.not_answered", question: "tenancy start date (year)"), + message: I18n.t("validations.not_answered", question: "tenancy start date (year)."), category: :setup, }, format: { @@ -332,7 +332,7 @@ class BulkUpload::Lettings::Year2023::RowParser validates :field_16, presence: { if: proc { supported_housing? }, - message: I18n.t("validations.not_answered", question: "scheme code"), + message: I18n.t("validations.not_answered", question: "scheme code."), category: :setup, }, on: :after_log @@ -344,7 +344,7 @@ class BulkUpload::Lettings::Year2023::RowParser }, inclusion: { in: [1, 2], - message: I18n.t("validations.invalid_option", question: "was the letting made under the Choice-Based Lettings (CBL)"), + message: I18n.t("validations.invalid_option", question: "was the letting made under the Choice-Based Lettings (CBL)?"), if: -> { field_116.present? }, }, on: :after_log @@ -356,7 +356,7 @@ class BulkUpload::Lettings::Year2023::RowParser }, inclusion: { in: [1, 2], - message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Allocation Policy (CAP)"), + message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Allocation Policy (CAP)?"), if: -> { field_117.present? }, }, on: :after_log @@ -368,7 +368,7 @@ class BulkUpload::Lettings::Year2023::RowParser }, inclusion: { in: [1, 2], - message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Housing Register (CHR)"), + message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Housing Register (CHR)?"), if: -> { field_118.present? }, }, on: :after_log @@ -574,7 +574,7 @@ private def validate_uprn_exists_if_any_key_address_fields_are_blank if field_18.blank? && (field_19.blank? || field_21.blank?) - errors.add(:field_18, I18n.t("validations.not_answered", question: "UPRN"), category: :not_answered) + errors.add(:field_18, I18n.t("validations.not_answered", question: "UPRN."), category: :not_answered) end end @@ -613,7 +613,7 @@ private def validate_needs_type_present if field_4.blank? - errors.add(:field_4, I18n.t("validations.not_answered", question: "needs type"), category: :setup) + errors.add(:field_4, I18n.t("validations.not_answered", question: "needs type."), category: :setup) end end @@ -658,10 +658,10 @@ private def validate_no_housing_needs_questions_answered if [field_83, field_84, field_85, field_86, field_87, field_88].all?(&:blank?) - errors.add(:field_87, I18n.t("validations.not_answered", question: "anybody with disabled access needs"), category: :not_answered) - errors.add(:field_86, I18n.t("validations.not_answered", question: "other access needs"), category: :not_answered) + errors.add(:field_87, I18n.t("validations.not_answered", question: "anybody with disabled access needs."), category: :not_answered) + errors.add(:field_86, I18n.t("validations.not_answered", question: "other access needs."), category: :not_answered) %i[field_83 field_84 field_85].each do |field| - errors.add(field, I18n.t("validations.not_answered", question: "disabled access needs type"), category: :not_answered) + errors.add(field, I18n.t("validations.not_answered", question: "disabled access needs type."), category: :not_answered) end end end @@ -670,7 +670,7 @@ private reason_fields = %i[field_111 field_112 field_113 field_114 field_115] if field_110 == 1 && reason_fields.all? { |field| attributes[field.to_s].blank? } reason_fields.each do |field| - errors.add(field, I18n.t("validations.not_answered", question: "reason for reasonable preference"), category: :not_answered) + errors.add(field, I18n.t("validations.not_answered", question: "reason for reasonable preference."), category: :not_answered) end end end @@ -685,7 +685,7 @@ private end elsif illness_option_fields.all? { |field| attributes[field.to_s].blank? } illness_option_fields.each do |field| - errors.add(field, I18n.t("validations.not_answered", question: "how is person affected by condition or illness"), category: :not_answered) + errors.add(field, I18n.t("validations.not_answered", question: "how is person affected by condition or illness."), category: :not_answered) end end end @@ -762,14 +762,14 @@ private if setup_question?(question) fields.each do |field| if errors.select { |e| fields.include?(e.attribute) }.none? - question_text = question.error_display_label.presence || "this question" + question_text = question.error_display_label.presence || "this question." errors.add(field, I18n.t("validations.not_answered", question: question_text.downcase), category: :setup) if field.present? end end else fields.each do |field| unless errors.any? { |e| fields.include?(e.attribute) } - question_text = question.error_display_label.presence || "this question" + question_text = question.error_display_label.presence || "this question." errors.add(field, I18n.t("validations.not_answered", question: question_text.downcase), category: :not_answered) end end @@ -787,7 +787,7 @@ private def validate_location_data_given if supported_housing? && location_id.blank? && location_field.present? block_log_creation! - errors.add(location_field, I18n.t("validations.not_answered", question: "#{location_or_scheme} code"), category: :setup) + errors.add(location_field, I18n.t("validations.not_answered", question: "#{location_or_scheme} code."), category: :setup) end end @@ -801,7 +801,7 @@ private def validate_scheme_data_given if supported_housing? && scheme_field.present? && scheme_id.blank? block_log_creation! - errors.add(scheme_field, I18n.t("validations.not_answered", question: "#{scheme_or_management_group} code"), category: :setup) + errors.add(scheme_field, I18n.t("validations.not_answered", question: "#{scheme_or_management_group} code."), category: :setup) end end @@ -855,7 +855,7 @@ private def validate_owning_org_data_given if field_1.blank? block_log_creation! - errors.add(:field_1, I18n.t("validations.not_answered", question: "owning organisation"), category: :setup) + errors.add(:field_1, I18n.t("validations.not_answered", question: "owning organisation."), category: :setup) end end @@ -871,13 +871,13 @@ private def validate_correct_intermediate_rent_type if field_11.blank? || ![1, 2, 3].include?(field_11.to_i) - errors.add(:field_11, I18n.t("validations.not_answered", question: "intermediate rent type"), category: :setup) + errors.add(:field_11, I18n.t("validations.not_answered", question: "intermediate rent type."), category: :setup) end end def validate_correct_affordable_rent_type if field_10.blank? || ![1, 2, 3].include?(field_10.to_i) - errors.add(:field_10, I18n.t("validations.not_answered", question: "is this a London Affordable Rent letting"), category: :setup) + errors.add(:field_10, I18n.t("validations.not_answered", question: "is this a London Affordable Rent letting."), category: :setup) end end diff --git a/app/services/bulk_upload/lettings/year2024/row_parser.rb b/app/services/bulk_upload/lettings/year2024/row_parser.rb index 3a18ac633..60b04c918 100644 --- a/app/services/bulk_upload/lettings/year2024/row_parser.rb +++ b/app/services/bulk_upload/lettings/year2024/row_parser.rb @@ -285,12 +285,12 @@ class BulkUpload::Lettings::Year2024::RowParser validates :field_11, presence: { - message: I18n.t("validations.not_answered", question: "rent type"), + message: I18n.t("validations.not_answered", question: "rent type."), category: :setup, }, inclusion: { in: (1..6).to_a, - message: I18n.t("validations.invalid_option", question: "rent type"), + message: I18n.t("validations.invalid_option", question: "rent type."), unless: -> { field_11.blank? }, category: :setup, }, @@ -298,28 +298,28 @@ class BulkUpload::Lettings::Year2024::RowParser validates :field_7, presence: { - message: I18n.t("validations.not_answered", question: "property renewal"), + message: I18n.t("validations.not_answered", question: "property renewal."), category: :setup, }, on: :after_log validates :field_8, presence: { - message: I18n.t("validations.not_answered", question: "tenancy start date (day)"), + message: I18n.t("validations.not_answered", question: "tenancy start date (day)."), category: :setup, }, on: :after_log validates :field_9, presence: { - message: I18n.t("validations.not_answered", question: "tenancy start date (month)"), + message: I18n.t("validations.not_answered", question: "tenancy start date (month)."), category: :setup, }, on: :after_log validates :field_10, presence: { - message: I18n.t("validations.not_answered", question: "tenancy start date (year)"), + message: I18n.t("validations.not_answered", question: "tenancy start date (year)."), category: :setup, }, format: { @@ -333,7 +333,7 @@ class BulkUpload::Lettings::Year2024::RowParser validates :field_5, presence: { if: proc { supported_housing? }, - message: I18n.t("validations.not_answered", question: "scheme code"), + message: I18n.t("validations.not_answered", question: "scheme code."), category: :setup, }, on: :after_log @@ -341,7 +341,7 @@ class BulkUpload::Lettings::Year2024::RowParser validates :field_6, presence: { if: proc { supported_housing? }, - message: I18n.t("validations.not_answered", question: "location code"), + message: I18n.t("validations.not_answered", question: "location code."), category: :setup, }, on: :after_log @@ -353,7 +353,7 @@ class BulkUpload::Lettings::Year2024::RowParser }, inclusion: { in: [1, 2], - message: I18n.t("validations.invalid_option", question: "was the letting made under the Choice-Based Lettings (CBL)"), + message: I18n.t("validations.invalid_option", question: "was the letting made under the Choice-Based Lettings (CBL)?"), if: -> { field_112.present? }, }, on: :after_log @@ -365,7 +365,7 @@ class BulkUpload::Lettings::Year2024::RowParser }, inclusion: { in: [1, 2], - message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Allocation Policy (CAP)"), + message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Allocation Policy (CAP)?"), if: -> { field_113.present? }, }, on: :after_log @@ -377,7 +377,7 @@ class BulkUpload::Lettings::Year2024::RowParser }, inclusion: { in: [1, 2], - message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Housing Register (CHR)"), + message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Housing Register (CHR)?"), if: -> { field_114.present? }, }, on: :after_log @@ -389,7 +389,7 @@ class BulkUpload::Lettings::Year2024::RowParser }, inclusion: { in: [1, 2], - message: I18n.t("validations.invalid_option", question: "was the letting made under the Accessible Register"), + message: I18n.t("validations.invalid_option", question: "was the letting made under the Accessible Register?"), if: -> { field_115.present? }, }, on: :after_log @@ -604,7 +604,7 @@ private def validate_uprn_exists_if_any_key_address_fields_are_blank if field_16.blank? && !key_address_fields_provided? - errors.add(:field_16, I18n.t("validations.not_answered", question: "UPRN")) + errors.add(:field_16, I18n.t("validations.not_answered", question: "UPRN.")) end end @@ -623,19 +623,19 @@ private def validate_address_fields if field_16.blank? || log.errors.attribute_names.include?(:uprn) if field_17.blank? - errors.add(:field_17, I18n.t("validations.not_answered", question: "address line 1")) + errors.add(:field_17, I18n.t("validations.not_answered", question: "address line 1.")) end if field_19.blank? - errors.add(:field_19, I18n.t("validations.not_answered", question: "town or city")) + errors.add(:field_19, I18n.t("validations.not_answered", question: "town or city.")) end if field_21.blank? - errors.add(:field_21, I18n.t("validations.not_answered", question: "part 1 of postcode")) + errors.add(:field_21, I18n.t("validations.not_answered", question: "part 1 of postcode.")) end if field_22.blank? - errors.add(:field_22, I18n.t("validations.not_answered", question: "part 2 of postcode")) + errors.add(:field_22, I18n.t("validations.not_answered", question: "part 2 of postcode.")) end end end @@ -681,7 +681,7 @@ private def validate_needs_type_present if field_4.blank? - errors.add(:field_4, I18n.t("validations.not_answered", question: "needs type"), category: :setup) + errors.add(:field_4, I18n.t("validations.not_answered", question: "needs type."), category: :setup) end end @@ -726,10 +726,10 @@ private def validate_no_housing_needs_questions_answered if [field_79, field_80, field_81, field_82, field_83, field_84].all?(&:blank?) - errors.add(:field_83, I18n.t("validations.not_answered", question: "anybody with disabled access needs")) - errors.add(:field_82, I18n.t("validations.not_answered", question: "other access needs")) + errors.add(:field_83, I18n.t("validations.not_answered", question: "anybody with disabled access needs.")) + errors.add(:field_82, I18n.t("validations.not_answered", question: "other access needs.")) %i[field_79 field_80 field_81].each do |field| - errors.add(field, I18n.t("validations.not_answered", question: "disabled access needs type")) + errors.add(field, I18n.t("validations.not_answered", question: "disabled access needs type.")) end end end @@ -738,7 +738,7 @@ private reason_fields = %i[field_107 field_108 field_109 field_110 field_111] if field_106 == 1 && reason_fields.all? { |field| attributes[field.to_s].blank? } reason_fields.each do |field| - errors.add(field, I18n.t("validations.not_answered", question: "reason for reasonable preference")) + errors.add(field, I18n.t("validations.not_answered", question: "reason for reasonable preference.")) end end end @@ -753,7 +753,7 @@ private end elsif illness_option_fields.all? { |field| attributes[field.to_s].blank? } illness_option_fields.each do |field| - errors.add(field, I18n.t("validations.not_answered", question: "how is person affected by condition or illness")) + errors.add(field, I18n.t("validations.not_answered", question: "how is person affected by condition or illness.")) end end end @@ -866,7 +866,7 @@ private def validate_managing_org_data_given if field_2.blank? block_log_creation! - errors.add(:field_2, I18n.t("validations.not_answered", question: "managing organisation"), category: :setup) + errors.add(:field_2, I18n.t("validations.not_answered", question: "managing organisation."), category: :setup) end end @@ -893,7 +893,7 @@ private def validate_owning_org_data_given if field_1.blank? block_log_creation! - errors.add(:field_1, I18n.t("validations.not_answered", question: "owning organisation"), category: :setup) + errors.add(:field_1, I18n.t("validations.not_answered", question: "owning organisation."), category: :setup) end end diff --git a/app/services/bulk_upload/sales/year2023/row_parser.rb b/app/services/bulk_upload/sales/year2023/row_parser.rb index 715a8983a..c649b7f8f 100644 --- a/app/services/bulk_upload/sales/year2023/row_parser.rb +++ b/app/services/bulk_upload/sales/year2023/row_parser.rb @@ -310,20 +310,20 @@ class BulkUpload::Sales::Year2023::RowParser validates :field_3, presence: { - message: I18n.t("validations.not_answered", question: "sale completion date (day)"), + message: I18n.t("validations.not_answered", question: "sale completion date (day)."), category: :setup, }, on: :after_log validates :field_4, presence: { - message: I18n.t("validations.not_answered", question: "sale completion date (month)"), + message: I18n.t("validations.not_answered", question: "sale completion date (month)."), category: :setup, }, on: :after_log validates :field_5, presence: { - message: I18n.t("validations.not_answered", question: "sale completion date (year)"), + message: I18n.t("validations.not_answered", question: "sale completion date (year)."), category: :setup, }, format: { @@ -335,7 +335,7 @@ class BulkUpload::Sales::Year2023::RowParser validates :field_7, presence: { - message: I18n.t("validations.not_answered", question: "purchase made under ownership scheme"), + message: I18n.t("validations.not_answered", question: "purchase made under ownership scheme."), category: :setup, }, on: :after_log @@ -351,7 +351,7 @@ class BulkUpload::Sales::Year2023::RowParser validates :field_8, presence: { - message: I18n.t("validations.not_answered", question: "type of shared ownership sale"), + message: I18n.t("validations.not_answered", question: "type of shared ownership sale."), category: :setup, if: :shared_ownership?, }, @@ -368,7 +368,7 @@ class BulkUpload::Sales::Year2023::RowParser validates :field_9, presence: { - message: I18n.t("validations.not_answered", question: "type of discounted ownership sale"), + message: I18n.t("validations.not_answered", question: "type of discounted ownership sale."), category: :setup, if: :discounted_ownership?, }, @@ -385,7 +385,7 @@ class BulkUpload::Sales::Year2023::RowParser validates :field_10, presence: { - message: I18n.t("validations.not_answered", question: "type of outright sale"), + message: I18n.t("validations.not_answered", question: "type of outright sale."), category: :setup, if: :outright_sale?, }, @@ -393,7 +393,7 @@ class BulkUpload::Sales::Year2023::RowParser validates :field_11, presence: { - message: I18n.t("validations.not_answered", question: "type of outright sale"), + message: I18n.t("validations.not_answered", question: "type of outright sale."), category: :setup, if: proc { field_10 == 12 }, }, @@ -410,7 +410,7 @@ class BulkUpload::Sales::Year2023::RowParser validates :field_12, presence: { - message: I18n.t("validations.not_answered", question: "company buyer"), + message: I18n.t("validations.not_answered", question: "company buyer."), category: :setup, if: :outright_sale?, }, @@ -427,7 +427,7 @@ class BulkUpload::Sales::Year2023::RowParser validates :field_13, presence: { - message: I18n.t("validations.not_answered", question: "buyers living in property"), + message: I18n.t("validations.not_answered", question: "buyers living in property."), category: :setup, if: :outright_sale?, }, @@ -435,7 +435,7 @@ class BulkUpload::Sales::Year2023::RowParser validates :field_14, presence: { - message: I18n.t("validations.not_answered", question: "joint purchase"), + message: I18n.t("validations.not_answered", question: "joint purchase."), category: :setup, if: :joint_purchase_asked?, }, @@ -443,7 +443,7 @@ class BulkUpload::Sales::Year2023::RowParser validates :field_15, presence: { - message: I18n.t("validations.not_answered", question: "more than 2 joint buyers"), + message: I18n.t("validations.not_answered", question: "more than 2 joint buyers."), category: :setup, if: :joint_purchase?, }, @@ -567,7 +567,7 @@ private def validate_data_protection_answered unless field_29 == 1 - errors.add(:field_29, I18n.t("validations.not_answered", question: QUESTIONS[:field_29].downcase), category: :setup) + errors.add(:field_29, I18n.t("validations.not_answered", question: "Data Protection question."), category: :setup) end end @@ -599,18 +599,18 @@ private def validate_uprn_exists_if_any_key_address_fields_are_blank if field_19.blank? && (field_20.blank? || field_22.blank?) - errors.add(:field_19, I18n.t("validations.not_answered", question: "UPRN"), category: :not_answered) + errors.add(:field_19, I18n.t("validations.not_answered", question: "UPRN."), category: :not_answered) end end def validate_address_fields if field_19.blank? || log.errors.attribute_names.include?(:uprn) if field_20.blank? - errors.add(:field_20, I18n.t("validations.not_answered", question: "address line 1"), category: :not_answered) + errors.add(:field_20, I18n.t("validations.not_answered", question: "address line 1."), category: :not_answered) end if field_22.blank? - errors.add(:field_22, I18n.t("validations.not_answered", question: "town or city"), category: :not_answered) + errors.add(:field_22, I18n.t("validations.not_answered", question: "town or city."), category: :not_answered) end end end diff --git a/app/services/bulk_upload/sales/year2024/row_parser.rb b/app/services/bulk_upload/sales/year2024/row_parser.rb index df1a06528..0103679fd 100644 --- a/app/services/bulk_upload/sales/year2024/row_parser.rb +++ b/app/services/bulk_upload/sales/year2024/row_parser.rb @@ -302,20 +302,20 @@ class BulkUpload::Sales::Year2024::RowParser validates :field_4, presence: { - message: I18n.t("validations.not_answered", question: "sale completion date (day)"), + message: I18n.t("validations.not_answered", question: "sale completion date (day)."), category: :setup, }, on: :after_log validates :field_5, presence: { - message: I18n.t("validations.not_answered", question: "sale completion date (month)"), + message: I18n.t("validations.not_answered", question: "sale completion date (month)."), category: :setup, }, on: :after_log validates :field_6, presence: { - message: I18n.t("validations.not_answered", question: "sale completion date (year)"), + message: I18n.t("validations.not_answered", question: "sale completion date (year)."), category: :setup, }, format: { @@ -327,7 +327,7 @@ class BulkUpload::Sales::Year2024::RowParser validates :field_8, presence: { - message: I18n.t("validations.not_answered", question: "purchase made under ownership scheme"), + message: I18n.t("validations.not_answered", question: "purchase made under ownership scheme."), category: :setup, }, on: :after_log @@ -343,7 +343,7 @@ class BulkUpload::Sales::Year2024::RowParser validates :field_9, presence: { - message: I18n.t("validations.not_answered", question: "type of shared ownership sale"), + message: I18n.t("validations.not_answered", question: "type of shared ownership sale."), category: :setup, if: :shared_ownership?, }, @@ -360,7 +360,7 @@ class BulkUpload::Sales::Year2024::RowParser validates :field_10, presence: { - message: I18n.t("validations.not_answered", question: "type of discounted ownership sale"), + message: I18n.t("validations.not_answered", question: "type of discounted ownership sale."), category: :setup, if: :discounted_ownership?, }, @@ -386,7 +386,7 @@ class BulkUpload::Sales::Year2024::RowParser validates :field_11, presence: { - message: I18n.t("validations.not_answered", question: "type of outright sale"), + message: I18n.t("validations.not_answered", question: "type of outright sale."), category: :setup, if: :outright_sale?, }, @@ -394,7 +394,7 @@ class BulkUpload::Sales::Year2024::RowParser validates :field_12, presence: { - message: I18n.t("validations.not_answered", question: "type of outright sale"), + message: I18n.t("validations.not_answered", question: "type of outright sale."), category: :setup, if: proc { field_11 == 12 }, }, @@ -411,7 +411,7 @@ class BulkUpload::Sales::Year2024::RowParser validates :field_13, presence: { - message: I18n.t("validations.not_answered", question: "company buyer"), + message: I18n.t("validations.not_answered", question: "company buyer."), category: :setup, if: :outright_sale?, }, @@ -428,7 +428,7 @@ class BulkUpload::Sales::Year2024::RowParser validates :field_14, presence: { - message: I18n.t("validations.not_answered", question: "buyers living in property"), + message: I18n.t("validations.not_answered", question: "buyers living in property."), category: :setup, if: :outright_sale?, }, @@ -436,7 +436,7 @@ class BulkUpload::Sales::Year2024::RowParser validates :field_15, presence: { - message: I18n.t("validations.not_answered", question: "joint purchase"), + message: I18n.t("validations.not_answered", question: "joint purchase."), category: :setup, if: :joint_purchase_asked?, }, @@ -444,7 +444,7 @@ class BulkUpload::Sales::Year2024::RowParser validates :field_16, presence: { - message: I18n.t("validations.not_answered", question: "more than 2 joint buyers"), + message: I18n.t("validations.not_answered", question: "more than 2 joint buyers."), category: :setup, if: :joint_purchase?, }, @@ -602,7 +602,7 @@ private def validate_uprn_exists_if_any_key_address_fields_are_blank if field_22.blank? && !key_address_fields_provided? - errors.add(:field_22, I18n.t("validations.not_answered", question: "UPRN")) + errors.add(:field_22, I18n.t("validations.not_answered", question: "UPRN.")) end end @@ -621,19 +621,19 @@ private def validate_address_fields if field_22.blank? || log.errors.attribute_names.include?(:uprn) if field_23.blank? - errors.add(:field_23, I18n.t("validations.not_answered", question: "address line 1")) + errors.add(:field_23, I18n.t("validations.not_answered", question: "address line 1.")) end if field_25.blank? - errors.add(:field_25, I18n.t("validations.not_answered", question: "town or city")) + errors.add(:field_25, I18n.t("validations.not_answered", question: "town or city.")) end if field_27.blank? - errors.add(:field_27, I18n.t("validations.not_answered", question: "part 1 of postcode")) + errors.add(:field_27, I18n.t("validations.not_answered", question: "part 1 of postcode.")) end if field_28.blank? - errors.add(:field_28, I18n.t("validations.not_answered", question: "part 2 of postcode")) + errors.add(:field_28, I18n.t("validations.not_answered", question: "part 2 of postcode.")) end end end @@ -1277,7 +1277,7 @@ private block_log_creation! if errors[:field_1].blank? - errors.add(:field_1, I18n.t("validations.not_answered", question: "owning organisation"), category: :setup) + errors.add(:field_1, I18n.t("validations.not_answered", question: "owning organisation."), category: :setup) end end end