You are here

public static function Helper::validEmail in Anti Spam by CleanTalk 8.3

* Valids email *

Return value

bool * @since 1.5

File

src/lib/Cleantalk/Common/Helper.php, line 642

Class

Helper
Cleantalk's hepler class

Namespace

Drupal\cleantalk\lib\Cleantalk\Common

Code

public static function validEmail($string) {
  if (!isset($string) || !is_string($string)) {
    return false;
  }
  return preg_match("/^\\S+@\\S+\$/i", $string);
}