Browse Source

feat: use i18n

pull/1225/head
natdeanlewissoftwire 2 years ago
parent
commit
b6bfd1fb6f
  1. 3
      app/models/validations/sales/sale_information_validations.rb
  2. 1
      config/locales/en.yml

3
app/models/validations/sales/sale_information_validations.rb

@ -11,7 +11,8 @@ module Validations::Sales::SaleInformationValidations
return if record.exdate.blank? || record.hodate.blank?
unless record.exdate > record.hodate
record.errors.add :hodate, "Practical completion or handover date must be before exchange date"
record.errors.add :exdate, I18n.t("validations.sale_information.handover_before_exchange")
record.errors.add :hodate,I18n.t("validations.sale_information.handover_before_exchange")
end
end

1
config/locales/en.yml

@ -417,6 +417,7 @@ en:
property_type_bedsit: "Bedsit bedroom maximum 1"
previous_property_type:
property_type_bedsit: "A bedsit can not have more than 1 bedroom"
handover_before_exchange: "Practical completion or handover date must be before exchange date"
soft_validations:
net_income:

Loading…
Cancel
Save