Browse Source

Corrects typo

pull/218/head
Stéphane Meny 4 years ago
parent
commit
1f3989fca9
No known key found for this signature in database
GPG Key ID: 9D0AFEA988527923
  1. 4
      app/models/validations/household_validations.rb
  2. 4
      config/locales/en.yml

4
app/models/validations/household_validations.rb

@ -27,11 +27,11 @@ module Validations::HouseholdValidations
def validate_armed_forces_injured(record)
if (record.armedforces == "A current or former regular in the UK Armed Forces (excluding National Service)" || record.armedforces == "A current or former reserve in the UK Armed Forces (excluding National Service)") && record.reservist.blank?
record.errors.add :reservist, I18n.t("validations.household.reservist.inquiry_required")
record.errors.add :reservist, I18n.t("validations.household.reservist.injury_required")
end
if (record.armedforces == "No" || record.armedforces == "Prefer not to say") && record.reservist.present?
record.errors.add :reservist, I18n.t("validations.household.reservist.inquiry_not_required")
record.errors.add :reservist, I18n.t("validations.household.reservist.injury_not_required")
end
end

4
config/locales/en.yml

@ -78,8 +78,8 @@ en:
underoccupation_benefitcap:
dont_know_required: "must be don’t know if tenant’s main reason for leaving is don’t know"
reservist:
inquiry_required: "You must answer the armed forces injury question if the tenant has served in the armed forces"
inquiry_not_required: "You must not answer the armed forces injury question if the tenant has not served in the armed forces or prefer not to say was chosen"
injury_required: "You must answer the armed forces injury question if the tenant has served in the armed forces"
injury_not_required: "You must not answer the armed forces injury question if the tenant has not served in the armed forces or prefer not to say was chosen"
leftreg:
question_required: "You must answer the armed forces active question if the tenant has served as a regular in the armed forces"
question_not_required: "You must not answer the armed forces active question if the tenant has not served as a regular in the armed forces"

Loading…
Cancel
Save