code: protected function detectSearchAttributeTypes()
      {
          $model = $this->getSearchModel();
  
          $attributeTypes = [];
          foreach ($model->activeAttributes() as $attribute) {
              $attributeTypes[$attribute] = self::TYPE_STRING;
          }
  
          foreach ($model->getValidators() as $validator) {
              $type = $this->detectSearchAttributeType($validator);
  
              if ($type !== null) {
                  foreach ((array) $validator->attributes as $attribute) {
                      $attributeTypes[$attribute] = $type;
                  }
              }
          }
  
          return $attributeTypes;
      }
docs: Composes default value for [[searchAttributeTypes]] from the [[searchModel]] validation rules.
  @return array attribute type map.