public static function validateEmail($paramName, array $data)
    {
        $result = false;
        if (isset($data[$paramName])) {
            $result = filter_var($data[$paramName], FILTER_VALIDATE_EMAIL) !== false;
        } else {
            throw new \Exception('Parameter is not set');
        }
        return $result;
    }
public static function validateEmail($paramName, array $data)
    {
        $result = false;
        if (isset($data[$paramName])) {
            $result = filter_var($data[$paramName], FILTER_VALIDATE_EMAIL) !== false;
        } else {
            throw new \Exception('Parameter is not set');
        }
        return $result;
    }
public static function validateEmail ( $ paramName , array $ data ) { $ result = false ; if ( isset ( $ data [ $ paramName ] ) ) { $ result = filter_var ( $ data [ $ paramName ] , FILTER_VALIDATE_EMAIL ) !== false ; } else { throw new \ Exception ( 'Parameter is not set' ) ; } return $ result ; }
Validate e-mail

@param string $paramName
@param array $data
@return bool
@throws \Exception
Validate e - mail