Skip to content

Commit

Permalink
force multiple = true in FilePondCollectionType
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Oct 19, 2023
1 parent 9053fee commit 1b0dae0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/file-filepond/src/FilePondCollectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class FilePondCollectionType extends FileType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
if ($options['multiple'] !== true) {
throw new \InvalidArgumentException('FilePondCollectionType only accept "multiple" option');
}

$builder
->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) {
$incomingFiles = $event->getData();
Expand Down

0 comments on commit 1b0dae0

Please sign in to comment.