taxonomy_form_term_validate

Versions
6 – 7
taxonomy_form_term_validate($form, &$form_state)

Validation handler for the term form.

See also

taxonomy_form_term()

Code

modules/taxonomy/taxonomy.admin.inc, line 740

<?php
function taxonomy_form_term_validate($form, &$form_state) {
  field_attach_form_validate('taxonomy_term', (object) $form_state['values'], $form, $form_state);

  // Ensure numeric values.
  if (isset($form_state['values']['weight']) && !is_numeric($form_state['values']['weight'])) {
    form_set_error('weight', t('Weight value must be numeric.'));
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.