You are here

function mass_contact_admin_edit_validate in Mass Contact 6

Same name and namespace in other branches
  1. 5.2 mass_contact.module \mass_contact_admin_edit_validate()
  2. 5 mass_contact.module \mass_contact_admin_edit_validate()
  3. 7 mass_contact.admin.inc \mass_contact_admin_edit_validate()

Validates the submission of the category add/edit page.

Parameters

form: An associative array containing the structure of the form.

form_state: A keyed array containing the current state of the form.

File

./mass_contact.module, line 509
This is the main code file for the Mass Contact module. This module enables users to contact multiple users through selected roles.

Code

function mass_contact_admin_edit_validate($form, &$form_state) {
  $recipients = $form_state['values']['recipients'];
  foreach ($recipients as $checkr) {
    if ($checkr > 1) {
      return;
    }
  }
  form_set_error('recipients', t('You must check one or more recipients.'));
}