You are here

function stickynav_admin_form_validate in Sticky Navigation 7

Validation callback for stickynav_admin_form().

File

admin/stickynav.admin.inc, line 90
Contains implementation of admin settings form for the sticky navigation

Code

function stickynav_admin_form_validate($form, &$form_state) {
  $themes = list_themes();
  foreach ($themes as $name => $data) {
    $name = 'stickynav-custom-offset-' . $name;
    if ($data->status == 1 && !empty($form_state['values'][$name]) && !is_numeric($form_state['values'][$name])) {
      form_set_error($name, t('The custom offset value has to be a number.'));
    }
  }
}