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;
    }