public function getNotEmptyMessage($field)
    {
        if (!isset($this->_fields[$field])) {
            return null;
        }

        $defaultMessage = 'This field cannot be left empty';
        if ($this->_useI18n) {
            $defaultMessage = __d('cake', 'This field cannot be left empty');
        }

        $notBlankMessage = null;
        foreach ($this->_fields[$field] as $rule) {
            if ($rule->get('rule') === 'notBlank' && $rule->get('message')) {
                return $rule->get('message');
            }
        }

        return isset($this->_allowEmptyMessages[$field])
            ? $this->_allowEmptyMessages[$field]
            : $defaultMessage;
    }
public function getNotEmptyMessage($field)
    {
        if (!isset($this->_fields[$field])) {
            return null;
        }

        $defaultMessage = 'This field cannot be left empty';
        if ($this->_useI18n) {
            $defaultMessage = __d('cake', 'This field cannot be left empty');
        }

        $notBlankMessage = null;
        foreach ($this->_fields[$field] as $rule) {
            if ($rule->get('rule') === 'notBlank' && $rule->get('message')) {
                return $rule->get('message');
            }
        }

        return isset($this->_allowEmptyMessages[$field])
            ? $this->_allowEmptyMessages[$field]
            : $defaultMessage;
    }
public function getNotEmptyMessage ( $ field ) { if ( ! isset ( $ this -> _fields [ $ field ] ) ) { return null ; } $ defaultMessage = 'This field cannot be left empty' ; if ( $ this -> _useI18n ) { $ defaultMessage = __d ( 'cake' , 'This field cannot be left empty' ) ; } $ notBlankMessage = null ; foreach ( $ this -> _fields [ $ field ] as $ rule ) { if ( $ rule -> get ( 'rule' ) === 'notBlank' && $ rule -> get ( 'message' ) ) { return $ rule -> get ( 'message' ) ; } } return isset ( $ this -> _allowEmptyMessages [ $ field ] ) ? $ this -> _allowEmptyMessages [ $ field ] : $ defaultMessage ; }
Gets the notEmpty message for a field

@param string $field Field name
@return string|null
Gets the notEmpty message for a field