fix: #3614360 Add commas to allowed types list on file upload fields

Closes #3614360

Restores the comma-delimited Allowed types list that was lost when webform_preprocess_file_upload_help() was rewritten in 6.3.x.

  • WebformManagedFileBase::prepare() now converts the display-only copy of the FileExtension validator to a comma-delimited list before passing it to file_upload_help. Validation continues to use the space-delimited list required by FileExtensionConstraintValidator.
  • getFileExtensions() now removes duplicate separators, so values like txt, pdf no longer become txt pdf, which previously rendered as txt, , pdf and broke explode(' ', ...) in getTestValues().

Tests: Updated the assertion in WebformElementManagedFileTest and added a managed_file_extensions_comma element to the test fixture. Not run locally; relying on CI.

Edited by Alan Rueda

Merge request reports

Loading