function comment_notify_settings_validate in Comment Notify 7
Same name and namespace in other branches
- 6 comment_notify.module \comment_notify_settings_validate()
1 string reference to 'comment_notify_settings_validate'
- comment_notify_settings in ./
comment_notify.module - Page callback for administrative settings form.
File
- ./
comment_notify.module, line 706 - 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', t('You must enable at least one subscription mode.'));
}
}