|
|
|
|
@ -396,22 +396,32 @@ class BulkUpload::Sales::Year2023::RowParser
|
|
|
|
|
}, |
|
|
|
|
on: :after_log |
|
|
|
|
|
|
|
|
|
validates :field_13, |
|
|
|
|
validates :field_12, |
|
|
|
|
inclusion: { |
|
|
|
|
in: [1, 2], |
|
|
|
|
if: proc { outright_sale? && field_12.present? }, |
|
|
|
|
category: :setup, |
|
|
|
|
question: QUESTIONS[:field_12].downcase, |
|
|
|
|
}, |
|
|
|
|
on: :before_log |
|
|
|
|
|
|
|
|
|
validates :field_12, |
|
|
|
|
presence: { |
|
|
|
|
message: I18n.t("validations.not_answered", question: "will the buyers live in the property"), |
|
|
|
|
message: I18n.t("validations.not_answered", question: "company buyer"), |
|
|
|
|
category: :setup, |
|
|
|
|
if: :outright_sale?, |
|
|
|
|
}, |
|
|
|
|
on: :after_log |
|
|
|
|
|
|
|
|
|
validates :field_12, |
|
|
|
|
validates :field_13, |
|
|
|
|
presence: { |
|
|
|
|
message: I18n.t("validations.not_answered", question: "company buyer"), |
|
|
|
|
message: I18n.t("validations.not_answered", question: "will the buyers live in the property"), |
|
|
|
|
category: :setup, |
|
|
|
|
if: :outright_sale?, |
|
|
|
|
}, |
|
|
|
|
on: :after_log |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
validates :field_14, |
|
|
|
|
presence: { |
|
|
|
|
message: I18n.t("validations.not_answered", question: "joint purchase"), |
|
|
|
|
|