You are here

public function CourseObjectNode::optionsValidate in Course 6

Same name and namespace in other branches
  1. 7.2 includes/CourseObjectNode.inc \CourseObjectNode::optionsValidate()
  2. 7 includes/CourseObjectNode.inc \CourseObjectNode::optionsValidate()

Validate the options form. Check the node type.

Overrides CourseObject::optionsValidate

File

includes/course_object.core.inc, line 1203

Class

CourseObjectNode
A course object that uses a node as a base.

Code

public function optionsValidate(&$form, &$form_state) {
  if (isset($form_state['values']['node_type']) && empty($form_state['values']['node_type'])) {
    form_set_error('node_type', 'Please select a node type.');
  }
}