diff --git a/core/lib/Drupal/Core/Render/Element/Details.php b/core/lib/Drupal/Core/Render/Element/Details.php
index a7fab35..630ed62 100644
--- a/core/lib/Drupal/Core/Render/Element/Details.php
+++ b/core/lib/Drupal/Core/Render/Element/Details.php
@@ -84,6 +84,24 @@ public static function preRenderDetails($element) {
       $element['#attributes']['open'] = 'open';
     }
 
+    // Loop through widgets looking for errors, make sure to enable #open if any are found.
+    if (!empty($element['#parents'])){
+      $parents = implode('][', $element['#parents']);
+      $children = Element::children($element['#groups'][$parents]);
+      if (!empty($children)) {
+        foreach ($children as $key) {
+          $child = $element['#groups'][$parents][$key];
+          if (isset($child['widget'])) {
+            foreach (Element::children($child['widget']) as $widget) {
+              if (isset($child['widget'][$widget]['value']) && $child['widget'][$widget]['value']['#errors'] != NULL) {
+                $element['#attributes']['open'] = 'open';
+              }
+            }
+          }
+        }
+      }
+    }
+
     // Do not render optional details elements if there are no children.
     if (isset($element['#parents'])) {
       $group = implode('][', $element['#parents']);
