diff --git a/app/models/applicants/personal_detail.rb b/app/models/applicants/personal_detail.rb index 49cc9fd6..b620cb13 100644 --- a/app/models/applicants/personal_detail.rb +++ b/app/models/applicants/personal_detail.rb @@ -66,7 +66,7 @@ def date_of_birth_not_in_future def age_less_than_maximum return unless date_of_birth.present? && (Date.current.year - date_of_birth.year) >= MAX_AGE - errors.add(:date_of_birth, "age should be below #{MAX_AGE} years") + errors.add(:date_of_birth) end end diff --git a/config/locales/en.yml b/config/locales/en.yml index 6c72f299..27e1e590 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -150,6 +150,7 @@ en: invalid: Enter a telephone number, like 07700 900 982 or +34 626 587 210’ date_of_birth: blank: Enter your date of birth + invalid: Age must be below 80 sex: blank: Enter your sex passport_number: