You are here

function file_entity_admin_files_validate in File Entity (fieldable files) 7.3

Same name and namespace in other branches
  1. 7 file_entity.admin.inc \file_entity_admin_files_validate()
  2. 7.2 file_entity.admin.inc \file_entity_admin_files_validate()

Validate file_entity_admin_files form submissions.

Check if any files have been selected to perform the chosen 'Update option' on.

1 string reference to 'file_entity_admin_files_validate'
file_entity_admin_files in ./file_entity.admin.inc
Form builder: Builds the file administration overview.

File

./file_entity.admin.inc, line 488

Code

function file_entity_admin_files_validate($form, &$form_state) {

  // Error if there are no items to select.
  if (!is_array($form_state['values']['files']) || !count(array_filter($form_state['values']['files']))) {
    form_set_error('', t('No items selected.'));
  }
}