code: protected function validateMimeType($file)
      {
          $fileMimeType = FileHelper::getMimeType($file->tempName);
  
          foreach ($this->mimeTypes as $mimeType) {
              if ($mimeType === $fileMimeType) {
                  return true;
              }
  
              if (strpos($mimeType, '*') !== false && preg_match($this->buildMimeTypeRegexp($mimeType), $fileMimeType)) {
                  return true;
              }
          }
  
          return false;
      }
docs: Checks the mimeType of the $file against the list in the [[mimeTypes]] property.
  
  @param UploadedFile $file
  @return bool whether the $file mimeType is allowed
  @throws \yii\base\InvalidConfigException
  @see mimeTypes
  @since 2.0.8