title: Multiple file validation: "This value should be of type string"
body: <p>I'm trying to use Symfony Validator on a file upload form (form extension's validation) and I'm getting this error message:</p>
  
  <blockquote>
    <p><strong>messageTemplate: "This value should be of type string."</strong> from Symfony\Component\Validator\ConstraintViolation</p>
  </blockquote>
  
  <p>Upload works well without the validator, and I cant figure out where this message is coming from.</p>
  
  <p>Here's my FormType, with a basic validation as doc's exemple: </p>
  
  <pre><code>    {
          $builder
              -&gt;add('file', FileType::class, [
                  'label' =&gt; 'Choisir un fichier',
                  'mapped' =&gt; false,
                  'multiple' =&gt; true,
                  'constraints' =&gt; [
                      new File([
                          'maxSize' =&gt; '1024k',
                          'mimeTypes' =&gt; [
                              'application/pdf',
                              'application/x-pdf',
                          ],
                          'mimeTypesMessage' =&gt; 'Please upload a valid PDF document',
                      ])
                  ],
              ])
          ;
      }
  </code></pre>
  
  <p>If I remove <code>maxSize</code>, <code>mimeTypes</code> and/or <code>mimeTypesMessage</code> arguments, I still have the same problem.</p>
  
  <p>I can't use annotations on entity (mapped option is set to <code>false</code>).</p>