You are here

function mass_contact_role_admin_edit_validate in Mass Contact 7

Category add/edit form validation callback.

Sets the form error and returns, whether selection is empty or not.

Parameters

array $form: A nested array of form elements that comprise the form.

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

Return value

bool Indicates whether a validation error has occurred or not.

1 string reference to 'mass_contact_role_admin_edit_validate'
mass_contact_role.inc in plugins/mass_contact_role.inc

File

plugins/mass_contact_role.inc, line 164

Code

function mass_contact_role_admin_edit_validate(array $form, array &$form_state) {
  $selected_roles = array_filter($form_state['values']['recipients']['mass_contact_role']);
  return empty($selected_roles);
}