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

        $defaultMessage = 'This field is required';
        if ($this->_useI18n) {
            $defaultMessage = __d('cake', 'This field is required');
        }

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

        $defaultMessage = 'This field is required';
        if ($this->_useI18n) {
            $defaultMessage = __d('cake', 'This field is required');
        }

        return isset($this->_presenceMessages[$field])
            ? $this->_presenceMessages[$field]
            : $defaultMessage;
    }
public function getRequiredMessage ( $ field ) { if ( ! isset ( $ this -> _fields [ $ field ] ) ) { return null ; } $ defaultMessage = 'This field is required' ; if ( $ this -> _useI18n ) { $ defaultMessage = __d ( 'cake' , 'This field is required' ) ; } return isset ( $ this -> _presenceMessages [ $ field ] ) ? $ this -> _presenceMessages [ $ field ] : $ defaultMessage ; }
Gets the required message for a field

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