public function getFieldKey(string $name) : string
    {
        $name = trim($name);
        $key = array_search($name, $_SESSION[$this->key]);

        // Field does not exist
        if ($key === false) {
            throw new \LogicException('Field ' . $name . ' does not exist');
        }

        return $key;
    }