[ 2 posts ]

Huey Brantley

  • Username: hpbrantley
  • Joined: Fri Feb 05, 2010 6:56 am
  • Posts: 22
  • Offline
  • Profile

Add Canadian Postal Code regEx. Comment only.

Post Posted: Tue Apr 13, 2010 8:38 am
+0-
If I'm not mistaken, you can use

f.setRegex('zip', /^([0-9]{5}(?:-[0-9]{4})?|[\w]{3} [\w]{3}?)$/); // US Postal Code. Zip+4 (+4 optional) or Canadian 7 char. 3space3

to check if zip is US Zip, US Zip+4 or Canadian 3 char SPACE 3 char. example: K0K 3R0

darlenehill19

  • Username: darlenehill19
  • Joined: Tue Feb 08, 2011 2:24 am
  • Posts: 1
  • Offline
  • Profile

Re: Add Canadian Postal Code regEx. Comment only.

Post Posted: Tue Feb 08, 2011 2:30 am
+0-
ya with slight experimentation it is working;
i tried that to develop Australian zip codes :idea:
working and fixed...
My Opinion: "Do Good" I Deal in: franking machines : Darlene Hill
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum