Indian States .module

vinayras - September 4, 2007 - 10:38
Project:CCK Address Extensions
Version:5.x-1.2
Component:India-Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi,

attached the .module file

Please let me know if this file is incorrect

Thanks
Vinay

AttachmentSize
cck_address_india.module.txt10.12 KB

#1

rconstantine - September 17, 2007 - 17:30

I just have a couple of questions.

First, is there really a locale called en_IN? If not, this would break your module. I would have thought that if India was going to use an English dialect/locale, that it would have been en_GB. Don't Indians speak British English?

Next, what kinds of zip codes do you have? In the validation function, it looks like you didn't change the regular expression from the Canadian version which expects two 3-character sets of alternating numbers and letters. Do a web search for Indian postal code regular expressions and replace the Canadian stuff with what you find. Or make your own. Compare the zip stuff in the other contributed modules to see how to change it.

Also, notice the other regular expressions and error messages in the validation function. Modify them to suit your situation if needed. Are the limited characters still valid for you?

Change these and try to get CVS access so I can add you to this project as a maintainer.

#2

vinayras - October 21, 2007 - 08:04

Thanks for the information.

I will work on it and get back to you.

Vinay

#3

rconstantine - October 22, 2007 - 17:41

By the way, there are many regular expression tutorial sites out there if you are intimidated by them. They can be complex, but are very helpful. There are also many programs, free or not, that allow you to construct regular expressions and test them before you even put them in your code. I'm using a plugin for the Eclipse IDE myself. There are even some online regex checkers too. Good luck.

#4

rconstantine - December 4, 2007 - 20:58
Status:active» closed

I fixed it myself, though I'm not sure about all of the validation. I did correct the ZIP validation and the locales.

 
 

Drupal is a registered trademark of Dries Buytaert.