- Issue created by @Christian.wiedemann
- Merge request !6769Issue-3423819: Add custom validator to BooleanCheckboxWidget class. → (Open) created by Christian.wiedemann
- 🇳🇿New Zealand quietone
Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.
- 🇩🇪Germany Christian.wiedemann
christian.wiedemann → changed the visibility of the branch 3423819-booleancheckboxwidget-doesnt-respect to hidden.
- Status changed to Needs review
2 months ago 11:22am 15 July 2025 - 🇮🇳India abhijith s
Getting this error after applying latest MR. Seems like validateElement method needs to be added in Widget.
The website encountered an unexpected error. Try again later. TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class Drupal\Core\Field\Plugin\Field\FieldWidget\BooleanCheckboxWidget does not have a method "validateElement" in call_user_func_array() (line 283 of core/lib/Drupal/Core/Form/FormValidator.php). Drupal\Core\Form\FormValidator->doValidateForm() (Line: 239) Drupal\Core\Form\FormValidator->doValidateForm() (Line: 239) Drupal\Core\Form\FormValidator->doValidateForm() (Line: 239) Drupal\Core\Form\FormValidator->doValidateForm() (Line: 118) Drupal\Core\Form\FormValidator->validateForm() (Line: 585) Drupal\Core\Form\FormBuilder->processForm() (Line: 321) Drupal\Core\Form\FormBuilder->buildForm() (Line: 73) Drupal\Core\Controller\FormController->getContentResult() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 622) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53) Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 715) Drupal\Core\DrupalKernel->handle() (Line: 19)
- 🇮🇳India abhijith s
Updated issue description as it appears to be copied from other issue