You are here

function workspace_configure_form_validate in Workspace 6

Same name and namespace in other branches
  1. 5 workspace.module \workspace_configure_form_validate()
  2. 7 workspace.module \workspace_configure_form_validate()

Validator for per-user configuration form.

See also

workspace_configure_form()

File

./workspace.module, line 191
Presents a user-centric view of content.

Code

function workspace_configure_form_validate($form, $form_state) {
  if (!is_numeric($form_state['values']['maxnodes'])) {
    form_set_error('maxnodes', t('Please enter a numeric value.'));
  }
  if (!is_numeric($form_state['values']['maxfilenames']) && !form_get_errors()) {
    form_set_error('maxfilenames', t('Please enter a numeric value.'));
  }
  if (module_exists('comment')) {
    if (!is_numeric($form_state['values']['maxcomments']) && !form_get_errors()) {
      form_set_error('maxfilenames', t('Please enter a numeric value.'));
    }
  }
}