normalization - Is there a library for normalizing postal codes? -


users of application asked country , postal code. want use postal codes key in data store. because postal codes entered user can have been entered in different forms. example canadian user might have entered:

  • a1a 1a1
  • a1a 1a1
  • a1a1a1
  • a1a 1a1
  • etc...

now can make normalization function canadian postal codes chooses 1 canonical form (for example, uppercase without spaces) , convert postal codes canonical form before saving db key.

but, covers canada. don't want reinvent wheel. there library or api out there can normalize (and possibly validate) postal codes (or many) countries?

thanks!

the important thing remember postal codes not countries have them, , addresses added, updated or removed, post codes can re-coded.

with in mind, if want ensure data you're capturing accurate, best solution use paid third party library or web service validate this. there number of companies provide services validate entire address, , not post code. these vary in global coverage , cost, depending on needs.

i work company provides address validation countries world wide through consistent interface, either web service or api can integrate with.

you can try out examples here: http://www.qas.co.uk/knowledge-centre/product-information/address-postcode-finder.htm


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -