You are here

function draggableviews_admin_validate in DraggableViews 6

Same name and namespace in other branches
  1. 6.2 draggableviews.module \draggableviews_admin_validate()

* Implementing hook_validate

File

./draggableviews.module, line 61

Code

function draggableviews_admin_validate($form, &$form_state) {
  $some_settings = $form_state['values']['draggableviews_some_settings'];
  if (!is_numeric($some_settings)) {
    form_set_error('draggleviews_some_settings', t('You must select a number for the maximum number of links.'));
  }
  else {
    if ($some_settings <= 0) {
      form_set_error('draggableviews_some_settings', t('Maximum number must be positive.'));
    }
  }
}