You are here

function comment_notify_settings_validate in Comment Notify 6

Same name and namespace in other branches
  1. 7 comment_notify.module \comment_notify_settings_validate()
1 string reference to 'comment_notify_settings_validate'
comment_notify_settings in ./comment_notify.module

File

./comment_notify.module, line 722
This module provides comment follow-up e-mail notification for anonymous and registered users.

Code

function comment_notify_settings_validate($form, &$form_state) {
  $sum_enabled = 0;
  foreach ($form_state['values']['comment_notify_available_alerts'] as $enabled) {
    $sum_enabled += $enabled;
  }
  if (!$sum_enabled) {
    form_set_error('comment_notify_available_alerts', 'You must enable at least one subscription mode.');
  }
}