|
|
|
@ -681,14 +681,14 @@ private |
|
|
|
if setup_question?(question) |
|
|
|
if setup_question?(question) |
|
|
|
fields.each do |field| |
|
|
|
fields.each do |field| |
|
|
|
if errors.select { |e| fields.include?(e.attribute) }.none? |
|
|
|
if errors.select { |e| fields.include?(e.attribute) }.none? |
|
|
|
question_text = question.display_label.presence || "this question" |
|
|
|
question_text = question.error_display_label.presence || "this question" |
|
|
|
errors.add(field, I18n.t("validations.not_answered", question: question_text.downcase), category: :setup) |
|
|
|
errors.add(field, I18n.t("validations.not_answered", question: question_text.downcase), category: :setup) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
else |
|
|
|
else |
|
|
|
fields.each do |field| |
|
|
|
fields.each do |field| |
|
|
|
unless errors.any? { |e| fields.include?(e.attribute) } |
|
|
|
unless errors.any? { |e| fields.include?(e.attribute) } |
|
|
|
question_text = question.display_label.presence || "this question" |
|
|
|
question_text = question.error_display_label.presence || "this question" |
|
|
|
errors.add(field, I18n.t("validations.not_answered", question: question_text.downcase)) |
|
|
|
errors.add(field, I18n.t("validations.not_answered", question: question_text.downcase)) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|