diff --git a/app/models/validations/property_validations.rb b/app/models/validations/property_validations.rb index d5ab8e9e0..0f0e2f265 100644 --- a/app/models/validations/property_validations.rb +++ b/app/models/validations/property_validations.rb @@ -38,6 +38,10 @@ module Validations::PropertyValidations record.errors.add :rsnvac, I18n.t("validations.property.rsnvac.referral_invalid") record.errors.add :referral, I18n.t("validations.household.referral.rsnvac_non_temp") end + + if record.renewal == 0 && record.rsnvac == 14 + record.errors.add :rsnvac, I18n.t("validations.property.rsnvac.not_a_renewal") + end end def validate_unitletas(record) diff --git a/config/locales/en.yml b/config/locales/en.yml index 55ea3a0f7..9a45d96dd 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -141,6 +141,7 @@ en: previous_let_social: "Property cannot have a previous let type if being let as social housing for the first time" non_temp_accommodation: "Answer cannot be re-let to tenant who occupied the same property as temporary accommodation as this accommodation is not temporary" referral_invalid: "Answer cannot be re-let to tenant who occupied the same property as temporary accommodation as a different source of referral for this letting" + not_a_renewal: "Reason for vacancy cannot be 'Renewal of fixed-term tenancy' if letting is not a renewal" unittype_gn: one_bedroom_bedsit: "A bedsit can only have one bedroom" one_seven_bedroom_shared: "A shared house must have 1 to 7 bedrooms"