protected function renderGroupWrapper(ElementInterface $element, $id, $control, $wrapper = null)
    {
        if (!$wrapper) {
            $wrapper = $this->groupWrapper;
        }
        $addErrorClass = $element->getMessages() ? ' has-error' : '';
        return sprintf($wrapper, $addErrorClass, $id, $control);
    }