473,386 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 3124
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,509 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

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

Similar topics

17
by: Andrew McLean | last post by:
I have a problem that is suspect isn't unusual and I'm looking to see if there is any code available to help. I've Googled without success. Basically, I have two databases containing lists of...
4
by: Dave \IT\ | last post by:
I'm looking to find out how I'd go about setting up a database where a visitor to my site could punch in their postal code, and find out how far they are from another postal code. For example,...
2
by: Axel Foley | last post by:
I used some of the excellent resources from DITHERING.COM for help in my groveling newbie attempts to cough up working form validation.... I cut and pasted bits of code to check USA ZIP codes and...
2
by: Bobbie | last post by:
I am trying to make mailing labels. The zip/postal codes are 9 digits (ex: 40601-0223) I ran a query and put in the input mask 00000/-9999;;_ and it works but when I make the mailing labels and...
1
by: Ronnie | last post by:
Hello there, I am creating a contact database and I would like my user to enter postal code (Canadian) and the city/province will be automatically filled in. I am sure this can be done and I can...
2
by: Surfdog | last post by:
Hello all, I'm unable to figure out how to process the zip codes with regexes. We have a custom component that takes a find pattern, a replace pattern, and the input value, and will output the...
3
by: John Bonds | last post by:
I'm looking for some sort of digital scale to integrate into .NET. Does anybody know of anything (like a postal scale) that attaches to USB, serial or whatever that comes with a DLL or an API...
0
by: pwilliams | last post by:
NCOALink Change of Address Verification Each year over 40 million Americans change their mailing addresses. This change is equivalent to every person in California deciding to change addresses...
5
by: Matt Nunnally | last post by:
I'm trying to get my zip code textbox to validate both US zip codes and Canadian Postal code formats. But I can't figure out the syntax. Can somebody help? Here is what I got: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.