Inspekt\Inspekt::isEmail PHP Method

isEmail() public static method

Returns true if value is a valid email format, false otherwise.
See also: http://www.regular-expressions.info/email.html
See also: self::ISPK_EMAIL_VALID
public static isEmail ( string $value ) : boolean
$value string
return boolean
    public static function isEmail($value)
    {
        return (bool) preg_match(self::ISPK_EMAIL_VALID, $value);
    }

Usage Example

Beispiel #1
0
 /**
  * Generated from @assert ('webmaster') === FALSE.
  */
 public function testIsEmail6()
 {
     $this->assertSame(false, Inspekt::isEmail('webmaster'));
 }