You are here

function mass_contact_admin_settings_header_validate in Mass Contact 6

Same name and namespace in other branches
  1. 7 mass_contact.admin.inc \mass_contact_admin_settings_header_validate()

Validates the message header administration settings form.

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 877
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_settings_header_validate($form, &$form_state) {
  if (!empty($form_state['values']['mass_contact_default_sender_name'])) {
    if (empty($form_state['values']['mass_contact_default_sender_email'])) {
      form_set_error('mass_contact_default_sender_email', t('If you are going to specify default user settings, you must specify both a user name and a user e-mail address.'));
    }
  }
  if (!empty($form_state['values']['mass_contact_default_sender_email'])) {
    if (empty($form_state['values']['mass_contact_default_sender_name'])) {
      form_set_error('mass_contact_default_sender_name', t('If you are going to specify default user settings, you must specify both a user name and a user e-mail address.'));
    }
  }
}