Jump to content

Email Validation


Recommended Posts

Receiving the following error:

Warning: preg_match() expects parameter 2 to be string, object given in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\classes\Validate.php on line 25

The email address is valid, the contact email address is valid, echo'd both at the function and they validate, result from function is "1"...

line 25:
static public function isEmail($email)
{
return preg_match('/^[a-z0-9]+[._a-z0-9-]*@[a-z0-9]+[._a-z0-9-]*\.[a-z0-9]+$/ui', $email);
}

Anyone seen this? Don't want to post an error if it isn't.

Link to comment
Share on other sites

×
×
  • Create New...