@ -337,14 +337,6 @@ class BulkUpload::Lettings::Year2023::RowParser
} ,
on : :after_log
validates :field_15 ,
presence : {
if : proc { supported_housing? && log_uses_old_scheme_id? } ,
message : I18n . t ( " validations.not_answered " , question : " management group code " ) ,
category : :setup ,
} ,
on : :after_log
validates :field_16 ,
presence : {
if : proc { supported_housing? } ,
@ -353,14 +345,6 @@ class BulkUpload::Lettings::Year2023::RowParser
} ,
on : :after_log
validates :field_17 ,
presence : {
if : proc { supported_housing? && log_uses_new_scheme_id? } ,
message : I18n . t ( " validations.not_answered " , question : " location code " ) ,
category : :setup ,
} ,
on : :after_log
validates :field_46 , format : { with : / \ A \ d{1,3} \ z| \ AR \ z / , message : " Age of person 1 must be a number or the letter R " } , on : :after_log
validates :field_52 , format : { with : / \ A \ d{1,3} \ z| \ AR \ z / , message : " Age of person 2 must be a number or the letter R " } , on : :after_log , if : proc { details_known? ( 2 ) . zero? }
validates :field_56 , format : { with : / \ A \ d{1,3} \ z| \ AR \ z / , message : " Age of person 3 must be a number or the letter R " } , on : :after_log , if : proc { details_known? ( 3 ) . zero? }
@ -775,7 +759,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
@ -789,7 +773,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