diff --git a/app/services/bulk_upload/sales/year2025/row_parser.rb b/app/services/bulk_upload/sales/year2025/row_parser.rb index feb607baf..6a5e3014d 100644 --- a/app/services/bulk_upload/sales/year2025/row_parser.rb +++ b/app/services/bulk_upload/sales/year2025/row_parser.rb @@ -393,6 +393,15 @@ class BulkUpload::Sales::Year2025::RowParser }, on: :after_log + validates :field_103, + numericality: { + greater_than_or_equal_to: 2, + less_than_or_equal_to: 10, + message: I18n.t("#{ERROR_BASE_KEY}.numeric.within_range", field: "Number of staircasing transactions", min: "2", max: "10"), + allow_blank: true, + }, + on: :before_log + validate :validate_buyer1_economic_status, on: :before_log validate :validate_buyer2_economic_status, on: :before_log validate :validate_valid_radio_option, on: :before_log diff --git a/app/views/form/_date_question.html.erb b/app/views/form/_date_question.html.erb index 55193b01a..a1df5f4d5 100644 --- a/app/views/form/_date_question.html.erb +++ b/app/views/form/_date_question.html.erb @@ -1,9 +1,10 @@ <%= render partial: "form/guidance/#{question.top_guidance_partial}" if question.top_guidance? %> +<% legend = legend(question, page_header, conditional) %> <%= render partial: "components/date_picker", locals: { resource: @log, question_id: question.id, - legend: { text: legend(question, page_header, conditional)[:text], size: "l", caption: caption(caption_text, page_header, conditional) }, + legend: { text: legend[:text], size: legend[:size], caption: caption(caption_text, page_header, conditional) }, resource_type: @log.log_type, hint: (question.hint_text.blank? ? "" : (question.hint_text.html_safe + "

".html_safe)) + "For example, #{date_mid_collection_year_formatted(@log.startdate).tr(' ', '/')}", f:,