You are here

function recently_read_settings_validate in Recently Read 7.2

Same name and namespace in other branches
  1. 6 recently_read.module \recently_read_settings_validate()
  2. 7.3 recently_read.module \recently_read_settings_validate()
  3. 7 recently_read.module \recently_read_settings_validate()

Implements FORM_ID_validate().

File

./recently_read.admin.inc, line 54
Functionality for Recently read administration.

Code

function recently_read_settings_validate($form, &$form_state) {
  $max = $form_state['values']['max_entries'];
  if (!is_numeric($max) || $max < 1) {
    form_set_error('max_entries', t('%field must be a positive integer value.', array(
      '%field' => $form['max_entries']['#title'],
    )));
  }
}