You are here

function video_preset_admin_settings_validate in Video 7.2

Same name and namespace in other branches
  1. 6.5 video.admin.inc \video_preset_admin_settings_validate()

File

modules/video_ui/video.admin.inc, line 99
Provides the administration settings for the Video Drupal module.

Code

function video_preset_admin_settings_validate($form, $form_state) {
  if (isset($form['video_preset'])) {
    $hasany = FALSE;
    foreach ($form_state['values']['video_preset'] as $name => $values) {
      if ($values['status'] == 1) {
        $hasany = TRUE;
        break;
      }
    }
    if (!$hasany) {
      form_error($form['video_preset'], t('You must enable at least one preset.'));
    }
  }
}