You are here

function jstimer_admin_settings_validate in Javascript Timer 6

Same name and namespace in other branches
  1. 7 jstimer.admin.inc \jstimer_admin_settings_validate()

File

./jstimer.admin.inc, line 52
countdowntimer.admin.inc -contains all admin pages, settings, and validate.

Code

function jstimer_admin_settings_validate($form, &$form_state) {

  // Form submitted with single quotes
  foreach ($form_state['values'] as $key => $value) {
    if (substr($key, 0, 15) == "countdowntimer_") {
      if (!strpos($value, "'") === FALSE) {
        form_set_error($key, t("Javascript Timer admin settings may not contain single quotes(')."));
        drupal_goto('admin/settings/countdowntimer');
      }
    }
  }
}