protected function validateDatum(string $key, $datum, string $regex): void
    {
        if (\is_array($datum)) {
            foreach ($datum as $datumItem) {
                $this->validateDatum($key, $datumItem, $regex);
            }

            return;
        }

        // If the value of the data doesn't match what was specified when the route was made
        if (preg_match('/^' . $regex . '$/', $datum) === 0) {
            throw new InvalidArgumentException(
                "Route param for {$key}, '{$datum}', does not match {$regex}"
            );
        }
    }