Skip to content
Snippets Groups Projects
Commit d04a6a84 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2637458 by legolasbo: Remove !placeholder in FormValidator::performRequiredValidation()

parent dffb3050
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -346,7 +346,7 @@ protected function performRequiredValidation(&$elements, FormStateInterface &$fo ...@@ -346,7 +346,7 @@ protected function performRequiredValidation(&$elements, FormStateInterface &$fo
foreach ($value as $v) { foreach ($value as $v) {
if (!isset($options[$v])) { if (!isset($options[$v])) {
$form_state->setError($elements, $this->t('An illegal choice has been detected. Please contact the site administrator.')); $form_state->setError($elements, $this->t('An illegal choice has been detected. Please contact the site administrator.'));
$this->logger->error('Illegal choice %choice in !name element.', array('%choice' => $v, '!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'])); $this->logger->error('Illegal choice %choice in %name element.', array('%choice' => $v, '%name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']));
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment