PDA

View Full Version : TellTale Store won't accept my Canadian Postal Code


Forbin
07/04/2010, 03:55 pm
I'm not sure why this is happening to me, but I know of at least one Canadian that does not have a problem.

When I try to enter my billing address for an order, the store repeatedly tells me that my postal code is in the wrong format. I've tried everything from using capitals, to lower case, with a "-" and without, but for some reason it will just not accept my Toronto postal code.

Macfly77
07/04/2010, 04:47 pm
Did you try leaving a space between the first three and the last three digits of the postal code?

Forbin
07/04/2010, 06:01 pm
Yeah that did it. Thanks a lot. Also if TellTale is interested, the company I used to work at used a service called Trillium(sp?) to convert user entered addresses to proper formats. It worked pretty well, but I'm not sure how much it cost them.

xbskid
07/08/2010, 03:09 pm
Also if TellTale is interested, the company I used to work at used a service called Trillium(sp?) to convert user entered addresses to proper formats. It worked pretty well, but I'm not sure how much it cost them.

I think it would be trivial for them to write their own code.

Forbin
07/09/2010, 08:11 am
I think it would be trivial for them to write their own code.It's not a trivial algorithm. There's a legal format for addresses that no user would ever enter (unless they're an accountant or something). Things get re-arranged from lines 1,2 and 3, certain words are capitalized, and the information is consolidated for accuracy. If you give it an address and a state, it can generate your full postal code (beyond the first 5 digits). If you give it the wrong information, it can correct it and will return error codes along with it's best guess at the address (this is handy for correcting spelling mistakes).

I was working at a company with around 60,000 employees, 5,000 developers and a huge Not-Invented-Here complex. Yet we still did not try to re-write this service, so either it was cheap or just way too much effort to duplicate.

flesk
07/12/2010, 04:09 am
I'm just a lazy perl programmer, but I would just do a "s/[^\da-z]//ig" on user input and see if it matches "/^[\da-z]{6}$/i". For real look-up, Canada Post offers directory listings to check against.