You are here

function views_bulk_operations_taxonomy_action_validate in Views Bulk Operations (VBO) 6.3

Same name and namespace in other branches
  1. 6 actions/taxonomy.action.inc \views_bulk_operations_taxonomy_action_validate()

File

./taxonomy.action.inc, line 181

Code

function views_bulk_operations_taxonomy_action_validate($form, $form_state) {
  if ($form_state['values']['do'] != TAXONOMY_ACTION_REPLACE) {
    $terms = _taxonomy_action_parse_terms($form_state['values']['taxonomy']);
    if (empty($terms)) {
      form_set_error('terms', t('You did not select any term nor did you choose to replace existing terms. Please select one or more terms or choose to replace the terms.'));
    }
  }
}