The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
![]()
I've been trying to write a REGEX to handle either US or Canadian zip codes. US Zipcodes is easy, however how do I validate a canadian zip code, and is it possible for the regular expression to check that the entered data is either US or Canadian format?
Format for US zipcodes is 5 characters, numbers only - therefore my regex for US zipcodes is: /^[0-9]{5}$/ Format for CANADA zipcodes is a little more complex, (# = number, and L = letter) and like this: 3 digits (format L#L) then a space then another 3 digits (#L#). Anyone able to get this done, and is it possible to do it with an OR therein? This is to be used in vbulletin custom user profile field. Thanks ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|