Browse Source

Better capitalisation

pull/2453/head
Rachael Booth 2 years ago
parent
commit
e60bd4d3cb
  1. 12
      app/services/bulk_upload/lettings/year2023/row_parser.rb
  2. 16
      app/services/bulk_upload/lettings/year2024/row_parser.rb

12
app/services/bulk_upload/lettings/year2023/row_parser.rb

@ -339,36 +339,36 @@ class BulkUpload::Lettings::Year2023::RowParser
validates :field_116, validates :field_116,
presence: { presence: {
message: I18n.t("validations.not_answered", question: QUESTIONS[:field_116]), message: I18n.t("validations.not_answered", question: "was the letting made under the Choice-Based Lettings (CBL)"),
category: :not_answered, category: :not_answered,
}, },
inclusion: { inclusion: {
in: [1, 2], in: [1, 2],
message: I18n.t("validations.invalid_option", question: QUESTIONS[:field_116]), message: I18n.t("validations.invalid_option", question: "was the letting made under the Choice-Based Lettings (CBL)"),
if: -> { field_116.present? }, if: -> { field_116.present? },
}, },
on: :after_log on: :after_log
validates :field_117, validates :field_117,
presence: { presence: {
message: I18n.t("validations.not_answered", question: QUESTIONS[:field_117]), message: I18n.t("validations.not_answered", question: "was the letting made under the Common Allocation Policy (CAP)"),
category: :not_answered, category: :not_answered,
}, },
inclusion: { inclusion: {
in: [1, 2], in: [1, 2],
message: I18n.t("validations.invalid_option", question: QUESTIONS[:field_117]), message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Allocation Policy (CAP)"),
if: -> { field_117.present? }, if: -> { field_117.present? },
}, },
on: :after_log on: :after_log
validates :field_118, validates :field_118,
presence: { presence: {
message: I18n.t("validations.not_answered", question: QUESTIONS[:field_118]), message: I18n.t("validations.not_answered", question: "was the letting made under the Common Housing Register (CHR)"),
category: :not_answered, category: :not_answered,
}, },
inclusion: { inclusion: {
in: [1, 2], in: [1, 2],
message: I18n.t("validations.invalid_option", question: QUESTIONS[:field_118]), message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Housing Register (CHR)"),
if: -> { field_118.present? }, if: -> { field_118.present? },
}, },
on: :after_log on: :after_log

16
app/services/bulk_upload/lettings/year2024/row_parser.rb

@ -339,48 +339,48 @@ class BulkUpload::Lettings::Year2024::RowParser
validates :field_112, validates :field_112,
presence: { presence: {
message: I18n.t("validations.not_answered", question: QUESTIONS[:field_112]), message: I18n.t("validations.not_answered", question: "was the letting made under the Choice-Based Lettings (CBL)"),
category: :not_answered, category: :not_answered,
}, },
inclusion: { inclusion: {
in: [1, 2], in: [1, 2],
message: I18n.t("validations.invalid_option", question: QUESTIONS[:field_112]), message: I18n.t("validations.invalid_option", question: "was the letting made under the Choice-Based Lettings (CBL)"),
if: -> { field_112.present? }, if: -> { field_112.present? },
}, },
on: :after_log on: :after_log
validates :field_113, validates :field_113,
presence: { presence: {
message: I18n.t("validations.not_answered", question: QUESTIONS[:field_113]), message: I18n.t("validations.not_answered", question: "was the letting made under the Common Allocation Policy (CAP)"),
category: :not_answered, category: :not_answered,
}, },
inclusion: { inclusion: {
in: [1, 2], in: [1, 2],
message: I18n.t("validations.invalid_option", question: QUESTIONS[:field_113]), message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Allocation Policy (CAP)"),
if: -> { field_113.present? }, if: -> { field_113.present? },
}, },
on: :after_log on: :after_log
validates :field_114, validates :field_114,
presence: { presence: {
message: I18n.t("validations.not_answered", question: QUESTIONS[:field_114]), message: I18n.t("validations.not_answered", question: "was the letting made under the Common Housing Register (CHR)"),
category: :not_answered, category: :not_answered,
}, },
inclusion: { inclusion: {
in: [1, 2], in: [1, 2],
message: I18n.t("validations.invalid_option", question: QUESTIONS[:field_114]), message: I18n.t("validations.invalid_option", question: "was the letting made under the Common Housing Register (CHR)"),
if: -> { field_114.present? }, if: -> { field_114.present? },
}, },
on: :after_log on: :after_log
validates :field_115, validates :field_115,
presence: { presence: {
message: I18n.t("validations.not_answered", question: QUESTIONS[:field_115]), message: I18n.t("validations.not_answered", question: "was the letting made under the Accessible Register"),
category: :not_answered, category: :not_answered,
}, },
inclusion: { inclusion: {
in: [1, 2], in: [1, 2],
message: I18n.t("validations.invalid_option", question: QUESTIONS[:field_115]), message: I18n.t("validations.invalid_option", question: "was the letting made under the Accessible Register"),
if: -> { field_115.present? }, if: -> { field_115.present? },
}, },
on: :after_log on: :after_log

Loading…
Cancel
Save