We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9900690 commit 99d626dCopy full SHA for 99d626d
1 file changed
src/TgUtils/Utils.php
@@ -121,6 +121,15 @@ public static function isEmpty($s) {
121
return strlen(trim($s)) == 0;
122
}
123
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
+
133
/**
134
* Checks whether an array is associative or not.
135
* @param array $arr - the array to be tested
0 commit comments