You are here

function search_log_admin_settings_validate in Search Log 6

Same name and namespace in other branches
  1. 7 search_log.admin.inc \search_log_admin_settings_validate()

Validate admin settings.

1 string reference to 'search_log_admin_settings_validate'
search_log_admin_settings in ./search_log.admin.inc
Display admin settings.

File

./search_log.admin.inc, line 79
Admin page callbacks file for the search_log module.

Code

function search_log_admin_settings_validate($form, &$form_state) {
  if (!preg_match('/^[0-9]+$/', $form_state['values']['search_log_cron'])) {
    form_set_error('search_log_cron', t('The number of days must be a number 0 or greater.'));
  }
}