Browse Source

CLDC-3676: lettings tenancy validations

CLDC-3676-remove-all-pre-2025-validations
samyou-softwire 1 week ago
parent
commit
6f4c7680b8
  1. 2
      app/models/validations/tenancy_validations.rb

2
app/models/validations/tenancy_validations.rb

@ -66,7 +66,7 @@ module Validations::TenancyValidations
def validate_joint_tenancy(record) def validate_joint_tenancy(record)
return unless record.collection_start_year && record.joint return unless record.collection_start_year && record.joint
if record.hhmemb == 1 && record.joint == 1 && record.collection_start_year >= 2022 if record.hhmemb == 1 && record.joint == 1
record.errors.add :joint, :not_joint_tenancy, message: I18n.t("validations.lettings.tenancy.joint.sole_tenancy") record.errors.add :joint, :not_joint_tenancy, message: I18n.t("validations.lettings.tenancy.joint.sole_tenancy")
record.errors.add :hhmemb, I18n.t("validations.lettings.tenancy.joint.multiple_members_required") record.errors.add :hhmemb, I18n.t("validations.lettings.tenancy.joint.multiple_members_required")
end end

Loading…
Cancel
Save