original_string: protected function getFormFieldModelInformationBasedRules(ModelFormFieldDataInterface $field)
      {
          $key              = $field->key();
          $modelInformation = $this->getModelInformation();
  
  
          if (array_key_exists($key, $modelInformation->attributes)) {
  
              return $this->getAttributeValidationResolver()->determineValidationRules(
                  $modelInformation->attributes[ $key ],
                  $field
              );
          }
  
          if (array_key_exists($key, $modelInformation->relations)) {
  
              return $this->getRelationValidationResolver()->determineValidationRules(
                  $modelInformation->relations[ $key ],
                  $field
              );
          }
  
          return false;
      }
code: protected function getFormFieldModelInformationBasedRules(ModelFormFieldDataInterface $field)
      {
          $key              = $field->key();
          $modelInformation = $this->getModelInformation();
  
  
          if (array_key_exists($key, $modelInformation->attributes)) {
  
              return $this->getAttributeValidationResolver()->determineValidationRules(
                  $modelInformation->attributes[ $key ],
                  $field
              );
          }
  
          if (array_key_exists($key, $modelInformation->relations)) {
  
              return $this->getRelationValidationResolver()->determineValidationRules(
                  $modelInformation->relations[ $key ],
                  $field
              );
          }
  
          return false;
      }
code_tokens: protected function getFormFieldModelInformationBasedRules ( ModelFormFieldDataInterface $ field ) { $ key = $ field -> key ( ) ; $ modelInformation = $ this -> getModelInformation ( ) ; if ( array_key_exists ( $ key , $ modelInformation -> attributes ) ) { return $ this -> getAttributeValidationResolver ( ) -> determineValidationRules ( $ modelInformation -> attributes [ $ key ] , $ field ) ; } if ( array_key_exists ( $ key , $ modelInformation -> relations ) ) { return $ this -> getRelationValidationResolver ( ) -> determineValidationRules ( $ modelInformation -> relations [ $ key ] , $ field ) ; } return false ; }
docstring: Returns validation rules based on model information for a given form field.
  
  @param ModelFormFieldDataInterface|ModelFormFieldData|null $field
  @return array|false
docstring_tokens: Returns validation rules based on model information for a given form field .