protected function processFormData(WebRequest $request, Response $response, EntityGroup $group)
    {
        $result = $this->layout->validateFormData($request, $response, function ($formValues) use ($group) {
            return $this->validateData(
                $group,
                $formValues['required-data.groupname']
            );
        });
    
        if ($result == Form::DATA_VALID) {
            $result = $this->saveGroup($request, $group);
        }

        return $result;
    }