468,316 Members | 2,062 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,316 developers. It's quick & easy.

Postal / Zip Code Validation

Hi

I have been asked to validate postal/zip codes against the countries like Netherland, United Kingdom, Spain, Italy, Belgium etc. Can anyone suggest that how can I do it programmatically using perl script or javascript preferablly.


Thanks.
May 23 '08 #1
4 2971
nithinpes
410 Expert 256MB
Hi

I have been asked to validate postal/zip codes against the countries like Netherland, United Kingdom, Spain, Italy, Belgium etc. Can anyone suggest that how can I do it programmatically using perl script or javascript preferablly.


Thanks.
In Perl, you can make use of hash. Store the country names and zip codes in hash as keys and values respectively. For ex.,
Expand|Select|Wrap|Line Numbers
  1. my %zip_code;
  2. $zip_code{Spain} = 'xxxxx' ;
  3.  
May 23 '08 #2
nithinpes
410 Expert 256MB
That's the generic way of doing it. But I believe, there should be specific modules available in CPAN for the purpose.
May 23 '08 #3
eWish
971 Expert 512MB
racshah

Please do not double post your questions. Please read the Posting Guidelines before making addiitonal posts. Your other thread has been deleted.

Thank You!

Kevin
May 23 '08 #4
numberwhun
3,503 Expert Mod 2GB
ptpro,

The topic that you are replying to is about a year and half old. That said, I doubt the OP is still working on this. While I thank you for the information (as I will probably peruse it), please keep in mind the age of the post you are replying to.

Regards,

Jeff


UPDATE: ptpro: I don't know if you have gone to this site recently, but if you do, you will be presented with the following message:

This application is currently offline. To enable the application, remove the app_offline.htm file from the application root directory.
Might want to test those links first.
Feb 1 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

17 posts views Thread by Andrew McLean | last post: by
4 posts views Thread by Dave \IT\ | last post: by
2 posts views Thread by Axel Foley | last post: by
1 post views Thread by Ronnie | last post: by
2 posts views Thread by Surfdog | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.