You are here

function biblio_citeproc_style_manager_form_validate in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/CiteProc/biblio_citeproc.admin.inc \biblio_citeproc_style_manager_form_validate()
  2. 7.2 modules/CiteProc/biblio_citeproc.admin.inc \biblio_citeproc_style_manager_form_validate()

File

modules/CiteProc/biblio_citeproc.admin.inc, line 177

Code

function biblio_citeproc_style_manager_form_validate($form, &$form_state) {
  if ($form_state['clicked_button']['#value'] == '<--' && count($form_state['values']['available_styles'])) {
    if (count($form_state['values']['available_styles']) > 60) {
      form_error($form['available_styles'], t('You may not select more than 60 styles for installation at one time'));
    }
  }
  if ($form_state['clicked_button']['#value'] == t('Set as site default') && !count($form_state['values']['installed_styles'])) {
    form_error($form['installed_styles'], t('You must select an installed style to set as the default.'));
  }
}