8 Replies - 4282 Views - Last Post: 29 December 2007 - 09:17 PM

#1 1learner  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-December 07

Zip Code / Postal Code Validation

Posted 24 December 2007 - 08:33 PM

Is there any standardised utility or API specifications for validation of postal or zip codes?
Is This A Good Question/Topic? 0
  • +

Replies To: Zip Code / Postal Code Validation

#2 lockdown  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 6
  • View blog
  • Posts: 394
  • Joined: 29-September 07

Re: Zip Code / Postal Code Validation

Posted 24 December 2007 - 08:42 PM

Are you looking for a database of zip codes to verify user input with?
Was This Post Helpful? 0
  • +
  • -

#3 1learner  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-December 07

Re: Zip Code / Postal Code Validation

Posted 24 December 2007 - 10:00 PM

View Postlockdown, on 24 Dec, 2007 - 08:42 PM, said:

Are you looking for a database of zip codes to verify user input with?


The application will accept addresses, so I guess ideally it should able to verify the address entered (e.g. Country and City) against the postal code.
Was This Post Helpful? 0
  • +
  • -

#4 lockdown  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 6
  • View blog
  • Posts: 394
  • Joined: 29-September 07

Re: Zip Code / Postal Code Validation

Posted 24 December 2007 - 10:06 PM

Well it all depends on what language u are going with. What do u want to programmer it in?
Was This Post Helpful? 0
  • +
  • -

#5 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Zip Code / Postal Code Validation

Posted 27 December 2007 - 09:01 AM

For the type of validation you are looking for, the methodology would be the same regardless of language. there are a few choices:

1. A database of valid codes with their corresponding address ranges (this can get out of date quickly.
2. An API that can be used to call a source that is maintained at a higher level (not sure what exists for the region you wish to validate against, or even what regions those may be).
3. A software implementation of the business logic around valid codes - the business logic is available from your postal service - you just have to write the code that checks against it.

What regions are you looking to validate against?
Was This Post Helpful? 0
  • +
  • -

#6 1learner  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-December 07

Re: Zip Code / Postal Code Validation

Posted 28 December 2007 - 08:38 AM

View PostAmadeus, on 27 Dec, 2007 - 09:01 AM, said:

For the type of validation you are looking for, the methodology would be the same regardless of language. there are a few choices:

1. A database of valid codes with their corresponding address ranges (this can get out of date quickly.
2. An API that can be used to call a source that is maintained at a higher level (not sure what exists for the region you wish to validate against, or even what regions those may be).
3. A software implementation of the business logic around valid codes - the business logic is available from your postal service - you just have to write the code that checks against it.

What regions are you looking to validate against?

Thanks. That sounds about right. We are looking for validating American and European / Middle Eastern addresses mainly. Are there any databases or services around that we could subscribe to?
Was This Post Helpful? 0
  • +
  • -

#7 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Zip Code / Postal Code Validation

Posted 28 December 2007 - 09:55 AM

There are quite a number, actually. A common one for US/Canada codes is the following:

http://www.zip-codes.com/

but there are many other services. In the end, the service you choose should be chosen based on how you will be validating...and remember, if you choose a standalone database representation, make sure they offer regular updates. :) Or update them yourself, of course.

Finally, depending on what language you are using to program in, some languages offer a postal code class that can at least validate the format, if not the code itself.
Was This Post Helpful? 0
  • +
  • -

#8 1learner  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-December 07

Re: Zip Code / Postal Code Validation

Posted 29 December 2007 - 09:07 PM

View PostAmadeus, on 28 Dec, 2007 - 09:55 AM, said:

There are quite a number, actually. A common one for US/Canada codes is the following:

http://www.zip-codes.com/

but there are many other services. In the end, the service you choose should be chosen based on how you will be validating...and remember, if you choose a standalone database representation, make sure they offer regular updates. :) Or update them yourself, of course.

Finally, depending on what language you are using to program in, some languages offer a postal code class that can at least validate the format, if not the code itself.


Thank you. That's useful.
Was This Post Helpful? 0
  • +
  • -

#9 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: Zip Code / Postal Code Validation

Posted 29 December 2007 - 09:17 PM

Another member had a similar problem not that long ago. What he did might interest you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1