function setElementError($element, $message = null)
    {
        if (!empty($message)) {
            $this->_errors[$element] = $message;
        } else {
            unset($this->_errors[$element]);
        }
    }
function setElementError($element, $message = null)
    {
        if (!empty($message)) {
            $this->_errors[$element] = $message;
        } else {
            unset($this->_errors[$element]);
        }
    }
function setElementError ( $ element , $ message = null ) { if ( ! empty ( $ message ) ) { $ this -> _errors [ $ element ] = $ message ; } else { unset ( $ this -> _errors [ $ element ] ) ; } }
Set error message for a form element

@param     string    $element    Name of form element to set error for
@param     string    $message    Error message, if empty then removes the current error message
@since     1.0
@access    public
@return    void
Set error message for a form element