You are here

function simplenews_subscription_list_add_validate in Simplenews 5

File

./simplenews.module, line 2117

Code

function simplenews_subscription_list_add_validate($form_id, $form_values) {
  $checked_newsletters = array_filter($form_values['newsletters']);
  if (!$checked_newsletters) {
    form_set_error('newsletters', t('You must select at least one newsletter.'));
  }
}