original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Gets the required message for a field
  
  @param string $field Field name
  @return string|null
docstring_tokens: Gets the required message for a field