original_string: public function determineValidationRules(ModelRelationData $relation, ModelFormFieldData $field)
      {
          $rules = [];
  
          if ($field->required() && ! $field->translated()) {
              $rules[] = 'required';
          } else {
              // Anything that is not required should by default be explicitly nullable
              // since Laravel 5.4.
              $rules[] = 'nullable';
          }
  
          // todo
          // make validation rules as far as possible, based on the key type (incrementing?)
          // or using exists:: ...
  
          return $rules;
      }
code: public function determineValidationRules(ModelRelationData $relation, ModelFormFieldData $field)
      {
          $rules = [];
  
          if ($field->required() && ! $field->translated()) {
              $rules[] = 'required';
          } else {
              // Anything that is not required should by default be explicitly nullable
              // since Laravel 5.4.
              $rules[] = 'nullable';
          }
  
          // todo
          // make validation rules as far as possible, based on the key type (incrementing?)
          // or using exists:: ...
  
          return $rules;
      }
code_tokens: public function determineValidationRules ( ModelRelationData $ relation , ModelFormFieldData $ field ) { $ rules = [ ] ; if ( $ field -> required ( ) && ! $ field -> translated ( ) ) { $ rules [ ] = 'required' ; } else { // Anything that is not required should by default be explicitly nullable // since Laravel 5.4. $ rules [ ] = 'nullable' ; } // todo // make validation rules as far as possible, based on the key type (incrementing?) // or using exists:: ... return $ rules ; }
docstring: Determines validation rules for given relation data.
  
  @param ModelRelationData  $relation
  @param ModelFormFieldData $field
  @return array|false
docstring_tokens: Determines validation rules for given relation data .