You are here

function mongodb_watchdog_filter_form_validate in MongoDB 6

Same name and namespace in other branches
  1. 7 mongodb_watchdog/mongodb_watchdog.admin.inc \mongodb_watchdog_filter_form_validate()

Validate result from mongodb_watchdog administration filter form.

1 string reference to 'mongodb_watchdog_filter_form_validate'
mongodb_watchdog_filter_form in mongodb_watchdog/mongodb_watchdog.admin.inc
Build the filter form.

File

mongodb_watchdog/mongodb_watchdog.admin.inc, line 329
Settings for mongodb. Moved back to module file.

Code

function mongodb_watchdog_filter_form_validate($form, &$form_state) {
  if ($form_state['values']['op'] == t('Filter') && empty($form_state['values']['type']) && empty($form_state['values']['severity'])) {
    form_set_error('type', t('You must select something to filter by.'));
  }
}