code: private function fakeFileData($data, $attribute)
      {
          if (! $this->validator->hasRule($attribute, ['Mimes', 'Image'])) {
              return;
          }
  
          $newFiles = $data;
          $newFiles[$attribute] = $this->createUploadedFile();
          $this->validator->setData($newFiles);
      }
docs: Generate fake data to get file type messages.
  
  @param $data
  @param $attribute
  @return void