Browse Source

feat: add postcode validation back

pull/1570/head
natdeanlewissoftwire 3 years ago
parent
commit
8e27f70b4a
  1. 2
      app/models/validations/local_authority_validations.rb

2
app/models/validations/local_authority_validations.rb

@ -3,7 +3,7 @@ module Validations::LocalAuthorityValidations
postcode = record.ppostcode_full postcode = record.ppostcode_full
if record.previous_postcode_known? && (postcode.blank? || !postcode.match(POSTCODE_REGEXP)) if record.previous_postcode_known? && (postcode.blank? || !postcode.match(POSTCODE_REGEXP))
record.errors.add :ppostcode_full, I18n.t("validations.postcode") record.errors.add :ppostcode_full, I18n.t("validations.postcode")
record.errors.add :ppcodenk, I18n.t("validations.postcode") record.errors.add :ppostcodenk, I18n.t("validations.postcode")
end end
end end
end end

Loading…
Cancel
Save