You are here

public function Question::setValidator in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Question/Question.php \Symfony\Component\Console\Question\Question::setValidator()

Sets a validator for the question.

Parameters

null|callable $validator:

Return value

Question The current instance

3 calls to Question::setValidator()
ChoiceQuestion::setErrorMessage in vendor/symfony/console/Question/ChoiceQuestion.php
Sets the error message for invalid values.
ChoiceQuestion::setMultiselect in vendor/symfony/console/Question/ChoiceQuestion.php
Sets multiselect option.
ChoiceQuestion::__construct in vendor/symfony/console/Question/ChoiceQuestion.php
Constructor.

File

vendor/symfony/console/Question/Question.php, line 164

Class

Question
Represents a Question.

Namespace

Symfony\Component\Console\Question

Code

public function setValidator($validator) {
  $this->validator = $validator;
  return $this;
}