You are here

public function ChoiceQuestion::setErrorMessage in Zircon Profile 8

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

Sets the error message for invalid values.

The error message has a string placeholder (%s) for the invalid value.

Parameters

string $errorMessage:

Return value

ChoiceQuestion The current instance

File

vendor/symfony/console/Question/ChoiceQuestion.php, line 102

Class

ChoiceQuestion
Represents a choice question.

Namespace

Symfony\Component\Console\Question

Code

public function setErrorMessage($errorMessage) {
  $this->errorMessage = $errorMessage;
  $this
    ->setValidator($this
    ->getDefaultValidator());
  return $this;
}