diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php
index 6aa4012..75ec480 100644
--- a/core/lib/Drupal/Core/Field/WidgetBase.php
+++ b/core/lib/Drupal/Core/Field/WidgetBase.php
@@ -444,7 +444,7 @@ public function flagErrors(FieldItemListInterface $items, ConstraintViolationLis
           foreach ($delta_violations as $violation) {
             // @todo: Pass $violation->arrayPropertyPath as property path.
             $error_element = $this->errorElement($delta_element, $violation, $form, $form_state);
-            if ($error_element !== FALSE) {
+            if ($error_element) {
               $form_state->setError($error_element, $violation->getMessage());
             }
           }
