You are here

function casetracker_node_validate in Case Tracker 7

Implements hook_node_validate().

File

./casetracker.module, line 372
Enables the handling of projects and their cases.

Code

function casetracker_node_validate($node, $form, &$form_state) {

  // Add case options to our basic case type.
  if (casetracker_is_case($node->type)) {
    if (empty($node->casetracker['pid']) && !casetracker_is_project($node->type)) {
      form_set_error('time', t('You must create a project before adding cases.'));
    }
  }
}