Add allowed file extensions in Views Send file field
Turns out the file behavior you're looking for is not defined for file elements, but for managed_files. It's as easy as:

/**
 * Implements hook_form_FORM_ID_alter().
 */
function my_module_form_views_form_send_page_alter(&amp;$form, &amp;$form_state) {
  if ($form_state['step'] == 'views_send_config_form') {
    $form['mail']['views_send_attachments']['#type'] = 'managed_file';
    $form['mail']['views_send_attachments']['#upload_validators']['file_validate_extensions'][] = 'docx';
  }
}


But views_send will have to be patched to support managed_files. This still needs work in the issue queue.



Yet, as I mention in the issue, you can hack it directly in the module. It's not recommended, but we don't have a hook here and the issue above might take a while to be solved. So just change the line

$file = file_save_upload('views_send_attachments', array(), $dir);


to

$file = file_save_upload('views_send_attachments', array('file_validate_extensions' =&gt; array('docx')), $dir);