verify : add email test

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2914 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-07-19 14:33:27 +00:00
parent 9a697c0034
commit 4ff02b11a4

View File

@@ -129,4 +129,16 @@ class verify
return FALSE;
return TRUE;
}
////////////////
// EMAILS //
////////////////
/** Return TRUE if the provided value is a valid email address
* @param string $val The value to check
* @return boolean
*/
public function is_email ($val)
{
return !! filter_var ($val, FILTER_VALIDATE_EMAIL);
}
}