diff --git a/app/models/validations/sales/household_validations.rb b/app/models/validations/sales/household_validations.rb index a8c04c1a9..9e6042564 100644 --- a/app/models/validations/sales/household_validations.rb +++ b/app/models/validations/sales/household_validations.rb @@ -25,9 +25,9 @@ private return unless age && relationship if age < 16 && person_is_partner?(relationship) - record.errors.add "relat#{person_num}", I18n.t("validations.household.relat.partner_under_16", person_num:) + record.errors.add "relat#{person_num}", I18n.t("validations.household.relat.partner_under_16") elsif age >= 20 && person_is_child?(relationship) - record.errors.add "relat#{person_num}", I18n.t("validations.household.relat.child_over_20", person_num:) + record.errors.add "relat#{person_num}", I18n.t("validations.household.relat.child_over_20") end end @@ -38,7 +38,7 @@ private return unless age && economic_status && relationship if age >= 16 && age <= 19 && !person_is_child?(relationship) && person_is_fulltime_student?(economic_status) - record.errors.add "relat#{person_num}", I18n.t("validations.household.relat.student_16_19_sales", person_num:) + record.errors.add "relat#{person_num}", I18n.t("validations.household.relat.student_16_19_sales") end end diff --git a/config/locales/en.yml b/config/locales/en.yml index d498a29e0..dc95e1bae 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -299,7 +299,6 @@ en: child_over_16: "Answer cannot be over 16 as person’s %{person_num} working situation is ‘child under 16‘" student_16_19: "Answer cannot be between 16 and 19 as person %{person_num} is a child of the lead tenant but is not a full-time student" partner_under_16: "Cannot be under 16 if the relationship is partner" - child_over_20: "Cannot be 20 or over as the relationship is child" lead: over_20: "The lead tenant must be under 20 as you told us their housing situation immediately before this letting was a children’s home or foster care" ecstat: @@ -311,11 +310,11 @@ en: retired_female: "Answer cannot be ‘retired’ as the female tenant is under 60" relat: partner_under_16: "Cannot be partner if the person's age is under 16" - child_under_16: "Person’s %{person_num}’s relationship to tenant 1 must be ‘child’ as you told us they’re under 16" + child_under_16: "Person’s relationship to tenant 1 must be ‘child’ as you told us they’re under 16" child_over_20: "Relationship cannot be ‘child’ if the person's age is 20 or over" one_partner: "Number of partners cannot be greater than 1" student_16_19: "Answer cannot be ‘child’ as you told us the person %{person_num} is between 16 and 19 and is not a full-time student" - student_16_19_sales: "Person %{person_num} must be a child if they are aged 16-19 and a student" + student_16_19_sales: "Person must be a child if they are aged 16-19 and a student" housingneeds_a: one_or_two_choices: "You can only select one option or ‘other disabled access needs’ plus ‘wheelchair-accessible housing’, ‘wheelchair access to essential rooms’ or ‘level access housing’" prevten: