plugin/exo/Library/Item/Definition/AbstractDefinition.php
public function validateAnswer($answer, AbstractItem $question, array $options = [])
    {
        $options[Validation::QUESTION] = $question;

        return $this->getAnswerValidator()->validate($answer, $options);
    }
public function validateAnswer($answer, AbstractItem $question, array $options = [])
    {
        $options[Validation::QUESTION] = $question;

        return $this->getAnswerValidator()->validate($answer, $options);
    }
public function validateAnswer ( $ answer , AbstractItem $ question , array $ options = [ ] ) { $ options [ Validation :: QUESTION ] = $ question ; return $ this -> getAnswerValidator ( ) -> validate ( $ answer , $ options ) ; }
Validates the answer data for a question.

@param mixed        $answer
@param AbstractItem $question
@param array        $options

@return array
Validates the answer data for a question .