protected function addError($field , $message) {
        if(array_key_exists($field, $this->errors)) {
            $this->errors[$field][] = $message;
        } else {
            $this->errors[$field] = [$message];
        }
        return $this;
    }
protected function addError($field , $message) {
        if(array_key_exists($field, $this->errors)) {
            $this->errors[$field][] = $message;
        } else {
            $this->errors[$field] = [$message];
        }
        return $this;
    }
protected function addError ( $ field , $ message ) { if ( array_key_exists ( $ field , $ this -> errors ) ) { $ this -> errors [ $ field ] [ ] = $ message ; } else { $ this -> errors [ $ field ] = [ $ message ] ; } return $ this ; }
add an error message
@param type $field
@param type $message
@return \oat\oatbox\validator\AbstractFormValidator
add an error message