You are here

function biblio_citeproc_csl_editor_validate in Bibliography Module 6.2

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

File

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

Code

function biblio_citeproc_csl_editor_validate($form, &$form_state) {
  if ($form_state['clicked_button']['#value'] == t('Save')) {
    $csl = $form_state['values']['editor'];
    $valid = biblio_citeproc_validate_csl($csl);
    if (!empty($valid)) {
      form_set_error('editor', $valid[0]);
    }
    else {
      $form_state['values']['editor'] = $csl;
    }
  }
}