Problem/Motivation
When using a combination of a text_format field with an image_file or document_file, the validation of the documents fail. This only happens when '#hide_help': true is not set.
The error is since version 6.3.1.
Steps to reproduce
Use this form
teaser_text:
'#type': text_format
'#title': 'Short description'
'#allowed_formats':
plain_text: plain_text
images:
'#type': image_file
'#title': Images
'#multiple': true
'#max_filesize': '3'
'#file_extensions': 'jpg jpeg png'
'#button': true
actions:
'#type': webform_actions
'#title': 'Submit button(s)'
'#submit__label': Verzenden
Then, upload an image > 3MB. This triggers the "Oops, something went wrong. Check your browser's developer console for more details" ajax error.
Comments
Comment #2
ishfaqafridi85 commentedI tried to reproduce this with Webform 6.3.1 on Drupal 10.3.10 and 11.4.8, but the file-size validation worked correctly and I did not get the AJAX error.
The example uses #type: image_file; should this be #type: webform_image_file?
Could you also provide the Drupal version and the browser console error?