From b6f7a0d232522b2f5c719a82c7850c8755096fe7 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 14 Mar 2022 10:53:36 +0000 Subject: [PATCH] Add more options to the validation (#383) --- app/models/validations/household_validations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/validations/household_validations.rb b/app/models/validations/household_validations.rb index 67688794f..a593b105b 100644 --- a/app/models/validations/household_validations.rb +++ b/app/models/validations/household_validations.rb @@ -80,7 +80,7 @@ module Validations::HouseholdValidations record.errors.add :sex1, I18n.t("validations.household.gender.male_refuge") end - if record.is_internal_transfer? && [3, 4, 10, 13, 19, 23, 24, 25, 26, 28, 29].include?(record.prevten) + if record.is_internal_transfer? && [3, 4, 7, 9, 10, 13, 14, 19, 21, 23, 24, 25, 26, 27, 28, 29].include?(record.prevten) label = record.form.get_question("prevten").present? ? record.form.get_question("prevten").label_from_value(record.prevten) : "" record.errors.add :prevten, I18n.t("validations.household.prevten.internal_transfer", prevten: label) record.errors.add :referral, I18n.t("validations.household.referral.prevten_invalid", prevten: label)