Use #element_validate for the upload element in the MediaLibraryUploadForm

Created on 25 July 2018, over 6 years ago
Updated 21 June 2023, over 1 year ago

Problem/Motivation

In \Drupal\media_library\Form\MediaLibraryUploadForm::buildForm, a #process callback is used to validate the cardinality of an upload. This was done as, in the developer's testing, #element_validate does not function properly when the element is submitted using AJAX.

This is functional for this use case, but we should figure out why #element_validate didn't work and fix the problem in core or the media_library module.

Proposed resolution

Move the ::validateUploadElement process callback into #element_validate .

Remaining tasks

Figure out the work required to do this, open more issues or change this issue's component if necessary.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ“Œ Task
Status

Closed: outdated

Version

8.8 ⚰️

Component
MediaΒ  β†’

Last updated about 6 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States samuel.mortenson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024