diff --git a/app/models/validations/sales/household_validations.rb b/app/models/validations/sales/household_validations.rb index 9a469ae5c..c597cb225 100644 --- a/app/models/validations/sales/household_validations.rb +++ b/app/models/validations/sales/household_validations.rb @@ -38,8 +38,8 @@ private return unless age && relationship if age < 16 && !relationship_is_child_other_or_refused?(relationship) - record.errors.add "age#{person_num}", I18n.t("validations.household.age.child_under_16_relat_sales") - record.errors.add "relat#{person_num}", I18n.t("validations.household.relat.child_under_16_sales") + record.errors.add "age#{person_num}", I18n.t("validations.household.age.child_under_16_relat_sales", person_num:) + record.errors.add "relat#{person_num}", I18n.t("validations.household.relat.child_under_16_sales", person_num:) elsif age >= 20 && person_is_child?(relationship) record.errors.add "age#{person_num}", I18n.t("validations.household.age.child_over_20") record.errors.add "relat#{person_num}", I18n.t("validations.household.relat.child_over_20") diff --git a/config/locales/en.yml b/config/locales/en.yml index 06123428c..11204d736 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -452,7 +452,7 @@ en: retired_over_70: "Answer cannot be over 70 as person %{person_num} has economic status that is not ‘retired’" child_under_16_relat_lettings: "Answer cannot be under 16 as person %{person_num}'s relationship to the lead tenant is not ‘child’, ‘other’ or ‘prefers not to say’" child_under_16_relat_sales: "Answer cannot be under 16 as person %{person_num}'s relationship to buyer 1 is not ‘child’, ‘other’ or ‘prefers not to say’" - child_under_16_ecstat: "Answer cannot be under 16 as person’s %{person_num} working situation is not ‘child under 16’, ‘other’ or ‘prefers not to say’" + child_under_16_ecstat: "Answer cannot be under 16 as person %{person_num}’s working situation is not ‘child under 16’, ‘other’ or ‘prefers not to say’" child_over_16: "Answer cannot be over 16 as person’s %{person_num} working situation is ‘child under 16‘" child_over_20: "Answer cannot be 20 or over as the relationship is ‘child’" child_12_years_younger: "A child must be at least 12 years younger than their parent"