protected function checkParent(string $module, array $options = [], array $config = []) : void
    {
        if (empty($config['parent'])) {
            return;
        }

        if (!empty($config['parent']['redirect'])) {
            //if redirect = parent, we force the user to mention the relation and module
            if (in_array($config['parent']['redirect'], ['parent'])) {
                if (empty($config['parent']['module'])) {
                    $this->errors[] = $module . " config [parent] requires 'module' value when redirect = parent.";
                }

                if (empty($config['parent']['relation'])) {
                    $this->errors[] = $module . " config [parent] requires 'relation' when redirect = parent.";
                }
            }
        }
    }