473,237 Members | 1,415 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,237 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 3121
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: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.