framework/base/Model.php
public function getFirstError($attribute)
    {
        return isset($this->_errors[$attribute]) ? reset($this->_errors[$attribute]) : null;
    }
public function getFirstError($attribute)
    {
        return isset($this->_errors[$attribute]) ? reset($this->_errors[$attribute]) : null;
    }
public function getFirstError ( $ attribute ) { return isset ( $ this -> _errors [ $ attribute ] ) ? reset ( $ this -> _errors [ $ attribute ] ) : null ; }
Returns the first error of the specified attribute.
@param string $attribute attribute name.
@return string the error message. Null is returned if no error.
@see getErrors()
@see getFirstErrors()
Returns the first error of the specified attribute .