Source for file SimpleCheck.php
Documentation is available at SimpleCheck.php
* Primitive email validation class based on the regexp found at
* http://www.regular-expressions.info/email.html
public function validate($string, $config, $context) {
// no support for named mailboxes i.e. "Bob <bob@example.com>"
// that needs more percent encoding to be done
if ($string ==
'') return false;
$result =
preg_match('/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i', $string);
return $result ?
$string :
false;
Documentation generated on Thu, 19 Jun 2008 18:50:20 -0400 by phpDocumentor 1.4.2