Live_file_input component and multiple files not validating for submitting

Hi all,

I’m switching a working allow_upload with max_entries set to 1, to now allow 5 files and I get the following:

The files are there, but my submit button won’t work. Going back to max_entries: 1 and all is good.

Screenshot from 2024-06-20 16-15-14

<div
              id="dropzone"
              class="mt-2 flex justify-center cursor-pointer rounded-lg border border-dashed border-gray-900/25 px-6 py-10"
              phx-drop-target={@uploads.loa.ref}
              phx-click={JS.dispatch("click", to: "##{@uploads.loa.ref}", bubbles: false)}
              phx-hook="ResiSwitchPdfPreview"
            >
              <div class="text-center">
                <svg
                  viewBox="0 0 512 512"
                  class="mx-auto h-12 w-12 text-gray-300"
                  viewBox="0 0 24 24"
                  fill="currentColor"
                  aria-hidden="true"
                >
                  >
                  <path
                    fill-rule="evenodd"
                    d="M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM176 352h32c30.9 0 56 25.1 56 56s-25.1 56-56 56H192v32c0 8.8-7.2 16-16 16s-16-7.2-16-16V448 368c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24H192v48h16zm96-80h32c26.5 0 48 21.5 48 48v64c0 26.5-21.5 48-48 48H304c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H320v96h16zm80-112c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v32h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V432 368z"
                    clip-rule="evenodd"
                  />
                </svg>
                <div class="mt-4 text-sm leading-6 text-gray-600">
                  <label
                    for={@uploads.loa.ref}
                    class="relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500"
                  >
                    <span>Upload a PDF</span>
                  </label>
                  <.live_file_input upload={@uploads.loa} required class="sr-only" />
                  <p class="pl-1">or drag and drop up to 10MB</p>
                </div>
              </div>
            </div>

Any ideas?

Thanks,
Gavin.

I’ve raised this here - live_file_input component and multiple files not validating for submitting · Issue #3319 · phoenixframework/phoenix_live_view · GitHub