You are here

function media_admin_validate in D7 Media 7

Validate media_admin_list form submissions.

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

1 string reference to 'media_admin_validate'
media_admin in includes/media.admin.inc
Display the list or thumbnails media admin display.

File

includes/media.admin.inc, line 265
This file contains the admin functions for the Media module.

Code

function media_admin_validate($form, &$form_state) {
  $files = array_filter($form_state['values']['files']);
  if (count($files) == 0) {
    form_set_error('', t('No items selected.'));
  }
}