|
|
|
@ -75,8 +75,8 @@ module Validations::HouseholdValidations
|
|
|
|
|
|
|
|
|
|
def validate_referral(record) |
|
|
|
|
if record.referral.present? && record.tenancy.present? && record.referral != "Internal transfer" && record.tenancy == "Secure (including flexible)" |
|
|
|
|
record.errors.add :referral, I18n.t("validations.household.referral.secure_tenancy") |
|
|
|
|
record.errors.add :tenancy, I18n.t("validations.tenancy.cannot_be_internal_transfer") |
|
|
|
|
record.errors.add :referral, I18n.t("validations.household.referral.secure_tenancy") |
|
|
|
|
record.errors.add :tenancy, I18n.t("validations.tenancy.cannot_be_internal_transfer") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|