You are here

function hosting_site_list_form_validate in Hostmaster (Aegir) 6

Validate hosting_site_list form submissions.

File

modules/hosting/site/hosting_site.module, line 617

Code

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