How do I validate the term title in hook_taxonomy_term_presave()? How do I validate the term title in hook_taxonomy_term_presave()?

Is there a way to proceed with the validations in hook_taxonomy_term_presave()?

@Edit

I rendered taxonomy add term form via "Inline Entity Form" module and here form_alter fails when it comes to validation.

Any other way if hook_entity_presave can't do this?
I assume you should be looking at hook_form_FORM_ID_alter instead of hook_taxonomy_term_presave for validating the term title before saving.

/**
* Implements hook_form_FORM_ID_alter().
**/
function mymodule_form_taxonomy_form_term_alter(&amp;$form,  &amp;$form_state, $form_id) {
  // Check for tags bundle.
  if($form['#bundle'] == 'tags') {
    // Apply custom validator.
    $form['#validate'][] = '_mymodule_custom_term_validator';
  }
}


My custom validator.

/**
 * My custom validator for tags.
 **/
function _mymodule_custom_term_validtor() {
  // Check for term name is test.
  if(form_state['values']['name'] == 'test') {
    form_set_error('name', 'Title cannot be "test"');
  }
}