|
Posted by Neeper on 10/02/93 11:32
I am trying to validate a postal code and a reference field, currently
I am using this these 2 functions:
// Validates the string if it consists of alphanumeric chars
function isAlphaNumeric($checkThisString)
{
// Originally, [^A-Za-z0-9[:space:]] but added support for
punctuation characters
if(ereg('[^A-Za-z0-9\.\,\'\#[:space:]]', $checkThisString))
return false;
else
return true;
}
I need to allow dashes( - ) in the postal code and not sure how to do
this.
Any help would be great.
Navigation:
[Reply to this message]
|