Enhancement
Major
Detail
Major
Detail
A FileName constraint can be set to a tl:DataField, which already excludes possible files on the client side.
In the case of a multi-upload, only the name of the first file is checked here.
All files to be uploaded should be checked here.
Improvement
The function window.parent.services.form.DataItemControl.fileNameUpdate(ctrlID, iframeID, newValue) was called with this.value for newValue. But the parameter contained only the first file name. Now this .files is used instead and the corresponding file names are extracted from it, which are then used to call the FileNameUpdate command.
Test
For example on a GalleryField of an A object in the demo. Upload several files at the same time (not via drag & drop, see #26740) and select at least one that does not match the allowed file type e.g. a text file. An appropriate error message should be displayed.