-
javascript regular Expressions
Hai,
I have one problem that is i need the canada postal code validations using regular expressions the postal code is of 7digits including white space a0E T5R means it is combination of digits and alphabets and a space after 3 digits.using javascript
please help me to getride from this problem.
Thanks & Regards
G.anuradha
-
-
Not positive but try validating against this
/^\s*[abceghj-nprstvxyABCEGHJ-NPRSTVXY]\d[a-zA-Z](\s)?\d[a-zA-Z]\d\s*$/
I've tested this but it fails against your example.
My investigations show that Canadian postcodes are formatted a9A 9A9, this code works against that.
I have also not allowed 'w' or 'z' as the first letter because they are not used yet
Last edited by forum_amnesiac; 05-12-2009 at 10:29 AM.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks