• undefined@lemmy.hogru.ch
    link
    fedilink
    arrow-up
    9
    ·
    3 days ago

    Luckily my application only has to work in Canada and the US.

    Sometimes one of my customers will ship to Mexico, and I just don’t validate those addresses because they’re a nightmare.

    Do you know of a great validator for the UK? My validation provider offers international validation but I just don’t trust that it’s accurate and take it on a country by country basis.

    • SquiffSquiff@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      2 days ago

      Sorry, only just seen this. I don’t work in this sector I am afraid. Some things that might help you:

      • There is no legal definition of a ‘valid’ address in the UK- If you post it then the Post Office will try to deliver it. If they can work it out from what is written, and they will try very hard, then that’s ‘an address’. This has been established in law.
      • There is advice on how you should write an address . This is how e.g. a bank or utility will address mail, but see above. TBH at this point you could probably put a What3Words on the envelope and it could work.
      • For most addresses in the UK you will want to correlate the postcode with the street address, as shown here. A street address is a number (or house name, or both) and a street name on one line, e.g. ‘29 Acacia Road’. Street address + Postcode is how people target e.g. a satnav to an address. A postcode generally relates to a group of addresses, but larger organisations, e.g. a hospital or council office will have a postcode just for them, e.g. ‘Buckingham Palace’. Beware that whilst postcodes don’t change, new ones are being added all the time and they aren’t sequential.
    • QuarterSwede@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      3 days ago

      Validators in the US aren’t great either btw. They’re always getting our address wrong or won’t validate zip+4 codes, which is supremely annoying when it’s more accurate.