protected function handleRequired(array $field)
    {
        if (!empty($field['attributes']['required'])) {
            if (empty($this->elementWrapperClass)) {
                $this->elementWrapperClass = '';
            } else {
                $this->elementWrapperClass .= ' ';
            }
            $this->elementWrapperClass .= 'required';
        }
    }