Browse Source

feat: rename

pull/1570/head
natdeanlewissoftwire 3 years ago
parent
commit
faf4e1f07c
  1. 4
      app/models/validations/financial_validations.rb
  2. 4
      config/locales/en.yml

4
app/models/validations/financial_validations.rb

@ -5,8 +5,8 @@ module Validations::FinancialValidations
# or 'validate_' to run on submit as well
def validate_outstanding_rent_amount(record)
if !record.has_housing_benefit_rent_shortfall? && record.tshortfall.present?
record.errors.add :tshortfall, :no_outstanding_charges, message: I18n.t("validations.financial.tshortfall.outstanding_amount_not_required")
record.errors.add :hbrentshortfall, :no_outstanding_charges, message: I18n.t("validations.financial.hbrentshortfall.outstanding_amount_not_required")
record.errors.add :tshortfall, :no_outstanding_charges, message: I18n.t("validations.financial.tshortfall.outstanding_amount_not_expected")
record.errors.add :hbrentshortfall, :no_outstanding_charges, message: I18n.t("validations.financial.hbrentshortfall.outstanding_amount_not_expected")
end
end

4
config/locales/en.yml

@ -242,11 +242,11 @@ en:
financial:
tshortfall:
outstanding_amount_not_required: "You cannot answer the outstanding amount question if you don’t have outstanding rent or charges"
outstanding_amount_not_expected: "You cannot answer the outstanding amount question if you don’t have outstanding rent or charges"
more_than_rent: "Enter a value less less than the basic rent amount"
must_be_positive: "Enter a value over £0.01 as you told us there is an outstanding amount"
hbrentshortfall:
outstanding_amount_not_required: "Answer must be ‘yes’ as you have answered the outstanding amount question"
outstanding_amount_not_expected: "Answer must be ‘yes’ as you have answered the outstanding amount question"
outstanding_no_benefits: "Answer cannot be ‘yes’ to outstanding amount for basic rent or charges if tenant does not receive housing benefit or Universal Credit or you‘re not sure"
benefits:
part_or_full_time: "Answer cannot be ‘all’ for income from Universal Credit, state pensions or benefits if the tenant or their partner works part-time or full-time"

Loading…
Cancel
Save