Disable (or workaround) form rebuild with managed_file field I'm using the Form API to create a custom form. It has a managed_file field and some other fields, some of which are required. If any of the required fields are not filled in, the file upload for the managed_file field doesn't work, and produces an error informing the user to fill out the required field first before the image upload can process.

I'm assuming this is because the form is being rebuilt when the form uploads, but is there a way to stop it from checking for required fields? Surely there is a way, as node edit forms have this functionality working.

Here is my form code (simplified):

function create_event_form($form, &amp;$form_state) {

  $form['event_image'] = array(
    '#type' =&gt; 'managed_file',
    '#upload_validators' =&gt; array(
      'file_validate_extensions' =&gt; array('jpg jpeg gif png')
    ),
    '#upload_location' =&gt; 'public://event_images/',
    '#required' =&gt; FALSE,
  );

  $form['event_name'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Event Name'),
    '#required' =&gt; TRUE,
  );

  $form['submit_button'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Create Event'),
  );

  return $form;
}


If event_name field is empty when attempting to upload a file, the upload will not process.
This was happening due to the Clientside Validation module being enabled.

For anyone having this issue, I had to override the form settings in Clientside Validation for this particular form, setting "Validate fields on submit" to "No".