code: public function validate(UploadedFile $file)
      {
          foreach ($this->allowedMimeTypes as $mimeType) {
              if ($mimeType === $file->getClientMimeType()
                  || (strpos($mimeType, '/*') !== false
                      && explode('/', $mimeType)[0] == explode('/', $file->getMimeType())[0])
              ) {
                  return true;
              }
          }
          return false;
      }
docs: {@inheritdoc]