You are here

function npop_validate_admin_settings_form in Node pop-up 7

Validate admin settings form. Check the overrided text not empty.

See also

npop_admin_settings_form().

1 string reference to 'npop_validate_admin_settings_form'
npop_admin_settings_form in ./npop.admin.inc
Main administration settings page form.

File

./npop.admin.inc, line 73
Node popup module administration pages functions.

Code

function npop_validate_admin_settings_form(&$form, &$form_state) {
  $is_override = $form_state['values']['npop_close_override'];
  if ($is_override) {
    $override_text = trim($form_state['values']['npop_close_override_text']);
    if (empty($override_text)) {
      form_set_error('npop_close_override_text', t('Fill the close link text if override text checked'));
    }
  }
}