original_string: protected function validateCombinationOptionsProduct($index, &$combination)
      {
          $options = $this->getSubmitted('product_fields.option');
  
          if (empty($options)) {
              return null;
          }
  
          $errors = 0;
  
          foreach ($options as $field_id => $field) {
              if (!empty($field['required']) && !isset($combination['fields'][$field_id])) {
                  $this->setErrorRequired("combination.$index.fields.$field_id", $field['title']);
                  $errors++;
              }
          }
  
          return empty($errors);
      }
code: protected function validateCombinationOptionsProduct($index, &$combination)
      {
          $options = $this->getSubmitted('product_fields.option');
  
          if (empty($options)) {
              return null;
          }
  
          $errors = 0;
  
          foreach ($options as $field_id => $field) {
              if (!empty($field['required']) && !isset($combination['fields'][$field_id])) {
                  $this->setErrorRequired("combination.$index.fields.$field_id", $field['title']);
                  $errors++;
              }
          }
  
          return empty($errors);
      }
code_tokens: protected function validateCombinationOptionsProduct ( $ index , & $ combination ) { $ options = $ this -> getSubmitted ( 'product_fields.option' ) ; if ( empty ( $ options ) ) { return null ; } $ errors = 0 ; foreach ( $ options as $ field_id => $ field ) { if ( ! empty ( $ field [ 'required' ] ) && ! isset ( $ combination [ 'fields' ] [ $ field_id ] ) ) { $ this -> setErrorRequired ( "combination.$index.fields.$field_id" , $ field [ 'title' ] ) ; $ errors ++ ; } } return empty ( $ errors ) ; }
docstring: Validates option combination fields
  @param integer $index
  @param array $combination
  @return boolean|null
docstring_tokens: Validates option combination fields