taxonomy_form_term_validate

function taxonomy_form_term_validate

taxonomy_form_term_validate($form, &$form_state)

Validation handler for the term form.

See also

taxonomy_form_term()

File

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

Code

function taxonomy_form_term_validate($form, &$form_state) {
  entity_form_field_validate('taxonomy_term', $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.'));
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.admin.inc/function/taxonomy_form_term_validate/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部