|
-
Postal Code validation (Canadian)
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?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
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