original_string: protected function validateNameLanguage()
      {
          $field = 'name';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if (!isset($value)) {
              $this->unsetSubmitted($field);
              return true; // If not set, code will be used instead
          }
  
          if (mb_strlen($value) > 50) {
              $this->setErrorLengthRange($field, $this->translation->text('Name'), 0, 50);
              return false;
          }
  
          return true;
      }
code: protected function validateNameLanguage()
      {
          $field = 'name';
  
          if ($this->isExcluded($field)) {
              return null;
          }
  
          $value = $this->getSubmitted($field);
  
          if (!isset($value)) {
              $this->unsetSubmitted($field);
              return true; // If not set, code will be used instead
          }
  
          if (mb_strlen($value) > 50) {
              $this->setErrorLengthRange($field, $this->translation->text('Name'), 0, 50);
              return false;
          }
  
          return true;
      }
code_tokens: protected function validateNameLanguage ( ) { $ field = 'name' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return true ; // If not set, code will be used instead } if ( mb_strlen ( $ value ) > 50 ) { $ this -> setErrorLengthRange ( $ field , $ this -> translation -> text ( 'Name' ) , 0 , 50 ) ; return false ; } return true ; }
docstring: Validates a language name
  @return boolean|null
docstring_tokens: Validates a language name