You are here

public function ScaleQuestion::getAnsweringFormValidate in Quiz 7.5

Same name and namespace in other branches
  1. 8.6 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleQuestion.php \ScaleQuestion::getAnsweringFormValidate()
  2. 8.5 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleQuestion.php \ScaleQuestion::getAnsweringFormValidate()
  3. 7.6 question_types/scale/scale.classes.inc \ScaleQuestion::getAnsweringFormValidate()

Question response validator.

Overrides QuizQuestion::getAnsweringFormValidate

File

question_types/scale/scale.classes.inc, line 386
Scale classes.

Class

ScaleQuestion
Extension of QuizQuestion.

Code

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