Skip to content

Commit c2844f9

Browse files
committed
Releasing 1.1.10
2 parents e88af3f + 99d626d commit c2844f9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/TgUtils/Utils.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ public static function isEmpty($s) {
121121
return strlen(trim($s)) == 0;
122122
}
123123

124+
/**
125+
* Tests whether string is a valid email syntax.
126+
* @param string $s - string to be tested
127+
* @return boolean TRUE when string is an email.
128+
*/
129+
public static function isEmail($s) {
130+
return filter_var($s, FILTER_VALIDATE_EMAIL);
131+
}
132+
124133
/**
125134
* Checks whether an array is associative or not.
126135
* @param array $arr - the array to be tested

0 commit comments

Comments
 (0)