Test if email_validate function exists and fix change the indentation from spaces to tabs.
This commit is contained in:
+13
-11
@@ -1326,17 +1326,19 @@ function number_pad($number,$n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//email validate
|
//email validate
|
||||||
function email_validate($strEmail){
|
if (!function_exists('email_validate')) {
|
||||||
$validRegExp = '/^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,3}$/';
|
function email_validate($strEmail){
|
||||||
// search email text for regular exp matches
|
$validRegExp = '/^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,3}$/';
|
||||||
preg_match($validRegExp, $strEmail, $matches, PREG_OFFSET_CAPTURE);
|
// search email text for regular exp matches
|
||||||
|
preg_match($validRegExp, $strEmail, $matches, PREG_OFFSET_CAPTURE);
|
||||||
|
|
||||||
if (count($matches) == 0) {
|
if (count($matches) == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user