function taxonomy_dupecheck_term_validate in Taxonomy dupecheck 7
Same name and namespace in other branches
- 6 taxonomy_dupecheck.module \taxonomy_dupecheck_term_validate()
Implements _form_validate() for taxonomy_form_term().
1 string reference to 'taxonomy_dupecheck_term_validate'
File
- ./
taxonomy_dupecheck.module, line 124 - Module file for the Taxonomy dupecheck module.
Code
function taxonomy_dupecheck_term_validate($form, &$form_state) {
$term = $form_state['values']['name'];
$vid = $form_state['values']['vid'];
$tid = $form_state['values']['tid'];
if (taxonomy_dupecheck_is_dupe_term($term, $vid, $tid)) {
form_set_error('name', t('The term %term already exists in this vocabulary.', array(
'%term' => check_plain($term),
)));
}
}