You are here

public function TrueFalseQuestion::getAnsweringFormValidate in Quiz 7.5

Same name and namespace in other branches
  1. 7.6 question_types/truefalse/truefalse.classes.inc \TrueFalseQuestion::getAnsweringFormValidate()

Question response validator.

Overrides QuizQuestion::getAnsweringFormValidate

File

question_types/truefalse/truefalse.classes.inc, line 129
TrueFalse classes.

Class

TrueFalseQuestion
Extension of QuizQuestion.

Code

public function getAnsweringFormValidate(array &$element, &$value) {
  if (is_null($value)) {
    form_error($element, t('You must provide an answer.'));
  }
}