|
|
|
|
@ -345,7 +345,7 @@ class BulkUpload::Lettings::Year2023::RowParser
|
|
|
|
|
validates :field_72, format: { with: /\A\d{1,3}\z|\AR\z/, message: "Age of person 7 must be a number or the letter R" }, allow_blank: true, on: :after_log |
|
|
|
|
validates :field_76, format: { with: /\A\d{1,3}\z|\AR\z/, message: "Age of person 8 must be a number or the letter R" }, allow_blank: true, on: :after_log |
|
|
|
|
|
|
|
|
|
validate :validate_needs_type_present |
|
|
|
|
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 |
|
|
|
|
@ -537,7 +537,7 @@ private
|
|
|
|
|
|
|
|
|
|
def validate_needs_type_present |
|
|
|
|
if field_4.blank? |
|
|
|
|
errors.add(:field_4, I18n.t("validations.not_answered", question: "needs type")) |
|
|
|
|
errors.add(:field_4, I18n.t("validations.not_answered", question: "needs type"), category: :setup) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|