Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Postal Code validation (Canadian)
Old 05-30-2010, 01:04 PM Postal Code validation (Canadian)
Junior Talker

Posts: 4
Trades: 0
I am using

<script>
function Validate()
{
var regEx = /[a-zA-Z][0-9][a-zA-Z](-| |)[0-9][a-zA-Z][0-9]/;
if(regEx.test())
{
alert('Valid Postal Code');
}
else
{
alert('Invalid Postal Code');
}
}

</script>

to validate the postal code with an onBlur function for some reason even if i type in a valid postal code it comes as invalid. Can anyone clarify why?

RESOLVED

Last edited by Ghuzarish; 05-30-2010 at 02:37 PM..
Ghuzarish is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-03-2010, 09:24 AM Re: Postal Code validation (Canadian)
Super Talker

Posts: 139
Name: John Davis
Trades: 0
You've miss text for checking.
You have supply postal code for checking as first paramenter - test(postalcode)
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Reply     « Reply to Postal Code validation (Canadian)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10508 seconds with 12 queries