taxonomy_form_term_validate

6 taxonomy.admin.inc taxonomy_form_term_validate($form, &$form_state)
7 taxonomy.admin.inc taxonomy_form_term_validate($form, &$form_state)
8 taxonomy.admin.inc taxonomy_form_term_validate($form, &$form_state)

Validation handler for the term edit form. Ensure numeric weight values.

See also

taxonomy_form_term()

File

modules/taxonomy/taxonomy.admin.inc, line 736
Administrative page callbacks for the taxonomy module.

Code

function taxonomy_form_term_validate($form, &$form_state) {
  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