public function validateFilter($filter)
    {
        // Match a regex pattern instead of just exploding on '-' (this fail with negative numbers).
        $regexp = "/(-?[0-9]+)-(-?[0-9]+)/";
        preg_match_all($regexp, $filter, $matches);

        // Whole match + two groups matches.
        if (count($matches) !== 3) {
            return false;
        }

        $filter = [current($matches[1]), current($matches[2])];

        // Legacy check for >=0 is also removed here.
        foreach ($filter as $v) {
            if (is_infinite((double) $v)) {
                return false;
            }
        }

        return $filter;
    }