protected function validator($varInput)
    {
        $blnHasError = false;
        foreach ($this->arrSubFields as $strFieldName => &$arrSubField) {
            if (!$this->validateWidget($arrSubField, $strFieldName, 'value', $varInput)) {
                $blnHasError = true;
            }

            foreach ($this->arrFlagFields as $strFlag => $arrFlagField) {
                if (!$this->validateWidget($arrFlagField, $strFieldName, $strFlag, $varInput)) {
                    $blnHasError = true;
                }
            }
        }
        unset($arrSubField);

        if ($blnHasError) {
            $this->blnSubmitInput = false;
            $this->addError($GLOBALS['TL_LANG']['ERR']['general']);
        }
        return $varInput;
    }