Is there any way to validate taxonomy terms?
there are these lines in shs.module:

$callbacks = array(
    'shs_json_term_get_children' =&gt; array(
      'callback' =&gt; 'shs_json_term_get_children',
      'arguments' =&gt; array(
        'vid' =&gt; 'is_numeric',
        'parent' =&gt; 'is_array',
        'settings' =&gt; 'is_array',
      ),
    ),
    'shs_json_term_add' =&gt; array(
      'callback' =&gt; 'shs_json_term_add',
      'arguments' =&gt; array(
        'vid' =&gt; 'is_numeric',
        'parent' =&gt; 'is_numeric',
        'name' =&gt; 'is_string',
      ),
    ),
  );
// Let other modules add some more callbacks and alter the existing. (!)
drupal_alter('shs_json_callbacks', $callbacks);


I think we can do something like this:

function MY_MODULE_json_callbacks(&amp;$callbacks) {
  $callbacks['shs_json_term_add']['callback'] = 'CUSTOM_CALLBACK';
}

function CUSTOM_CALLBACK($vid, $parent, $term_name) {
  if(!NEW_CONDITIONS) {
    return FALSE;
  }

  return shs_json_term_add($vid, $parent, $term_name);
}