original_string: protected function validateTextReview()
      {
          $field = 'text';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if ($this->isUpdating() && !isset($value)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          $label = $this->translation->text('Text');
  
          if (empty($value)) {
              $this->setErrorRequired($field, $label);
              return false;
          }
  
          $length = mb_strlen($value);
          list($min, $max) = $this->review->getLimits();
  
          if ($length < $min || $length > $max) {
              $this->setErrorLengthRange($field, $label, $min, $max);
              return false;
          }
  
          return true;
      }
code: protected function validateTextReview()
      {
          $field = 'text';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if ($this->isUpdating() && !isset($value)) {
              $this->unsetSubmitted($field);
              return null;
          }
  
          $label = $this->translation->text('Text');
  
          if (empty($value)) {
              $this->setErrorRequired($field, $label);
              return false;
          }
  
          $length = mb_strlen($value);
          list($min, $max) = $this->review->getLimits();
  
          if ($length < $min || $length > $max) {
              $this->setErrorLengthRange($field, $label, $min, $max);
              return false;
          }
  
          return true;
      }
code_tokens: protected function validateTextReview ( ) { $ field = 'text' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isUpdating ( ) && ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } $ label = $ this -> translation -> text ( 'Text' ) ; if ( empty ( $ value ) ) { $ this -> setErrorRequired ( $ field , $ label ) ; return false ; } $ length = mb_strlen ( $ value ) ; list ( $ min , $ max ) = $ this -> review -> getLimits ( ) ; if ( $ length < $ min || $ length > $ max ) { $ this -> setErrorLengthRange ( $ field , $ label , $ min , $ max ) ; return false ; } return true ; }
docstring: Validates a review text
  @return boolean|null
docstring_tokens: Validates a review text