You are here

function javascript_libraries_edit_form_validate in JavaScript Libraries Manager 7

Form validate for javascript_libraries_edit_form().

File

./javascript_libraries.admin.inc, line 483
Administrative management forms for JavaScript libraries.

Code

function javascript_libraries_edit_form_validate($form, &$form_state) {
  switch ($form_state['values']['library_type']) {
    case 'external':
      _javascript_libraries_url_validate($form, $form_state);
      break;
    case 'file':
      _javascript_libraries_file_validate($form, $form_state);
      break;
  }

  // Trim the name/description:
  $form_state['values']['name'] = trim($form_state['values']['name']);
}