Ensure UK address formatting
I've noticed that we don't format UK addresses consistently.
By searching https://github.com/datenanfragen/data/search?q=london you can find some addresses formatted like this:
Street name 1 City ZIPCODE
and some like this:
Street name 1 City ZIPCODE
Does this need fixing?
Yeah, we should standardize that.
Unless I forget, I use:
Street name 1 City ZIPCODE
Iirc I decided on that a few years ago as it seemed to be the recommended format. But we should double-check that.
This was fixed for the existing records by @davenewham in #1347. But I am leaving this issue open as I think we should implement a test for that to ensure we don't regress on this in future records.
We can just implement a special case for the UK in the tests. And given the standardised formatting we have agreed on, it shouldn't be hard to verify the city and postcode.
Working on this and I have noticed that quite a few records contain the county. This is not needed https://www.postoffice.co.uk/mail/how-to-address-mail. Do we want to enforce the above format, and remove existing records' counties?
Sounds good to me :+1:
Just for clarification: In your link is "Locality name (if needed)" the county? Could there be a case where it is needed? (Sorry, I'm not familiar with UK addressing at all. :D)
I'll gladly defer to you on this: If you say that it's never needed, I'm fine with never including the county.
Hey @baltpeter
Out of interest, I checked the updated version of the Royal Mail PAF Guidance.
Please see below.
Organisations PAF® holds the name of the Organisation. The maximum field length is 60 characters.
Organisation Name Building Name Thoroughfare Post Town Postcode
For example
Kath's Cakes Victoria House High Street PORTSMOUTH PO1 1AF
Thanks, @Ryan4Reform. If I understand correctly, that means we don't need the county, as @davenewham said?