You are here

function fieldset_helper_admin_settings_validate in Fieldset helper 7.2

Same name and namespace in other branches
  1. 6.2 fieldset_helper.admin.inc \fieldset_helper_admin_settings_validate()
  2. 6 fieldset_helper.admin.inc \fieldset_helper_admin_settings_validate()

Implementation of FORM_ID_validate().

File

./fieldset_helper.admin.inc, line 142
Administration page for the 'Fieldset helper' module.

Code

function fieldset_helper_admin_settings_validate($form, &$form_state) {

  // Check that cookie duration is a valid number.
  if (preg_match('/^\\d+$/', $form_state['values']['fieldset_helper_cookie_duration']) === 0) {
    form_set_error('fieldset_helper_cookie_duration', t('Cookie duration must be a valid number.'));
  }
}