You are here

function messaging_admin_settings_validate in Messaging 7

Same name and namespace in other branches
  1. 6.4 messaging.admin.inc \messaging_admin_settings_validate()

Preprocess method settings into variables

1 string reference to 'messaging_admin_settings_validate'
messaging_admin_settings in ./messaging.admin.inc
Admin settings form

File

./messaging.admin.inc, line 60
Messaging Framework - Admin UI

Code

function messaging_admin_settings_validate($form, &$form_state) {

  // Check the default method is enabled
  $default = $form_state['values']['messaging_default_method'];
  if (!$default || empty($form_state['values']['messaging_method_enabled'][$default])) {
    form_set_error('', t('You must select on of the enabled methods as the default one.'));
  }
}