Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ChoiceQuestion.php

function ChoiceQuestion::setErrorMessage

Sets the error message for invalid values.

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

Return value

$this

File

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

Class

ChoiceQuestion
Represents a choice question.

Namespace

Symfony\Component\Console\Question

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal