You are here

function encrypt_config_form_validate in Encrypt 7.3

Same name and namespace in other branches
  1. 7.2 includes/encrypt.admin.inc \encrypt_config_form_validate()

Form validation handler for encrypt_config_form().

File

includes/encrypt.admin.inc, line 318
This file holds the functions for the Encrypt admin settings.

Code

function encrypt_config_form_validate($form, &$form_state) {

  // Don't allow the default configuration to be disabled.
  $default_config = variable_get('encrypt_default_config', NULL);
  if ($default_config == $form_state['values']['name'] && !$form_state['values']['enabled']) {
    form_set_error('general_settings][enabled', t('The default configuration must be enabled.'));
  }
}