There's something else not working, here.
I've tried the above example and that won't work, either. Here's my method:
Code:
// check whether input is a valid web address
function isWebAddress($field, $value, $msg) {
$value = $this->_getValue($value);
$pattern = "^(http|https|ftp)://(www\.)?.+\.(com|net|org)$";
if(preg_match($pattern, $value)) {
return true;
} else {
$this->validateArrayErrorList[] = array("field" => $field, "msg" => $msg);
return false;
} // end if
} // end function isWebAddress
It's strange, because I've got another method for email addresses that works fine.
This method just doesn't want to work!
Bookmarks