You are here

function popup_onload_admin_settings_form_validate in Popup On Load 7

Popup On Load admin settings form validation callback.

File

./popup_onload.admin.inc, line 194
Administrative interface callbacks of the Popup On Load module.

Code

function popup_onload_admin_settings_form_validate($form, &$form_state) {
  $numeric_values = [
    POPUP_ONLOAD_VAR_COOKIE_LIFETIME,
    POPUP_ONLOAD_VAR_DISPLAY_DELAY,
  ];
  foreach ($numeric_values as $form_field) {
    if (!is_numeric($form_state['values'][$form_field])) {
      form_set_error($form_field, t('Please specify numeric value.'));
    }
  }
}