Browse Source

Page validations need to match form page names

pull/93/head
baarkerlounger 4 years ago
parent
commit
90d7524a9b
  1. 2
      app/validations/household_validations.rb
  2. 4
      config/forms/2021_2022.json

2
app/validations/household_validations.rb

@ -45,7 +45,7 @@ module HouseholdValidations
end
end
def validate_household_pregnancy(record)
def validate_pregnancy(record)
if (record.preg_occ == "Yes" || record.preg_occ == "Prefer not to say") && !women_of_child_bearing_age_in_household(record)
record.errors.add :preg_occ, "You must answer no as there are no female tenants aged 16-50 in the property"
end

4
config/forms/2021_2022.json

@ -196,7 +196,7 @@
}
}
},
"age1": {
"person_1_age": {
"header": "",
"description": "",
"questions": {
@ -294,7 +294,7 @@
}
}
},
"tenant_economic_status": {
"person_1_economic": {
"header": "",
"description": "",
"questions": {

Loading…
Cancel
Save