public static function validateEmail($email)
    {
        $email = trim($email);

        if (false === filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw new \InvalidArgumentException(sprintf('The Email "%s" is invalid.', $email));
        }

        return $email;
    }
public static function validateEmail($email)
    {
        $email = trim($email);

        if (false === filter_var($email, FILTER_VALIDATE_EMAIL)) {
            throw new \InvalidArgumentException(sprintf('The Email "%s" is invalid.', $email));
        }

        return $email;
    }
public static function validateEmail ( $ email ) { $ email = trim ( $ email ) ; if ( false === filter_var ( $ email , FILTER_VALIDATE_EMAIL ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The Email "%s" is invalid.' , $ email ) ) ; } return $ email ; }
Validator for a Email.

@param string $email

@return string
Validator for a Email .