Browse Source

Add error to location field

CLDC-4159-address-uprn-for-supported-housing
oscar-richardson-softwire 3 days ago
parent
commit
41004e73f3
  1. 1
      app/models/validations/property_validations.rb

1
app/models/validations/property_validations.rb

@ -57,6 +57,7 @@ module Validations::PropertyValidations
return unless location_postcode
if postcode != location_postcode
record.errors.add :location_id, I18n.t("validations.lettings.property.location_id.postcode_does_not_match_scheme_location_postcode")
record.errors.add :uprn, I18n.t("validations.lettings.property.uprn.postcode_does_not_match_scheme_location_postcode")
record.errors.add :postcode_full, I18n.t("validations.lettings.property.postcode_full.does_not_match_scheme_location_postcode")
end

Loading…
Cancel
Save