]> git.openstreetmap.org Git - nominatim.git/commit
Properly validate postcodes with country code
authorPaweł Wroniszewski <pawel.wroniszewski@traveltime.com>
Mon, 16 Oct 2023 22:44:24 +0000 (00:44 +0200)
committerPaweł Wroniszewski <pwronisz@gmail.com>
Mon, 16 Oct 2023 23:04:07 +0000 (01:04 +0200)
commitfbe40e005dfeecb937c92355492049dc4eb05f7d
treeb236e912d0e7cf519f2038cb4095f62d54f9bb1a
parent95c3181a350538317678d5fef5122ed4b284b012
Properly validate postcodes with country code

Include postcode pattern in postcode normalisation regex, instead of
removing it from postcode pattern in config.

It properly handles postcode validation and normalization when country code
is part of the postcode, e.g. for Isle of Man, Jersey, Anguilla, Andorra,
Cayman Islands and more.

Fixes #3227.
nominatim/data/postcode_format.py
settings/country_settings.yaml
test/python/tokenizer/sanitizers/test_clean_postcodes.py