public function getError($field)
    {
        $errors = isset($this->_errors[$field]) ? $this->_errors[$field] : [];
        if ($errors) {
            return $errors;
        }

        return $this->_nestedErrors($field);
    }
public function getError($field)
    {
        $errors = isset($this->_errors[$field]) ? $this->_errors[$field] : [];
        if ($errors) {
            return $errors;
        }

        return $this->_nestedErrors($field);
    }
public function getError ( $ field ) { $ errors = isset ( $ this -> _errors [ $ field ] ) ? $ this -> _errors [ $ field ] : [ ] ; if ( $ errors ) { return $ errors ; } return $ this -> _nestedErrors ( $ field ) ; }
Returns validation errors of a field

@param string $field Field name to get the errors from
@return array
Returns validation errors of a field