code: public function validate(UploadedFile $file)
      {
          $size = method_exists($file, 'getClientSize') ?
              $file->getClientSize() : $file->getSize();
  
          return ($this->maxSize === null || $size <= $this->maxSize)
              && ($this->minSize === null || $size >= $this->minSize);
      }
docs: {@inheritdoc}