public function FormStateDecoratorBase::setError in Markdown 8.2
Flags an element as having an error.
Parameters
array $element: The form element.
string $message: (optional) The error message to present to the user.
Return value
$this
Overrides FormStateInterface::setError
File
- src/
BcSupport/ FormStateDecoratorBase.php, line 641
Class
- FormStateDecoratorBase
- Decorates another form state.
Namespace
Drupal\markdown\BcSupportCode
public function setError(array &$element, $message = '') {
$this->decoratedFormState
->setError($element, $message);
return $this;
}