public function hasError($attribName = null)
    {
        if (is_null($attribName)) {
            return count($this->invalidAttribs) > 0 || count($this->missingAttribs) > 0;
        } else {
            return isset($this->invalidAttribs[$attribName]) || isset($this->missingAttribs[$attribName]);
        }
    }