diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig index a3484d9036bec..6b5183592eded 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig @@ -261,12 +261,12 @@ {% block form_errors -%} {%- if errors|length > 0 -%} -
- -
+ + {%- for error in errors -%} + + {{ 'Error'|trans({}, 'validators') }} {{ error.message }} + + {%- endfor -%} + {%- endif %} {%- endblock form_errors %} diff --git a/src/Symfony/Component/Form/Tests/AbstractBootstrap4HorizontalLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractBootstrap4HorizontalLayoutTest.php index e8ede167b3802..c906c6549ad2f 100644 --- a/src/Symfony/Component/Form/Tests/AbstractBootstrap4HorizontalLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractBootstrap4HorizontalLayoutTest.php @@ -32,14 +32,12 @@ public function testRow() [ ./label[@for="name"] [ - ./div[ - ./ul - [./li - [./span[.="[trans]Error[/trans]"]] - [./span[.="[trans]Error![/trans]"]] - ] - [count(./li)=1] - ] + ./span[@class="alert alert-danger"] + [./span[@class="mb-0 d-block"] + [./span[.="[trans]Error[/trans]"]] + [./span[.="[trans]Error![/trans]"]] + ] + [count(./span)=1] ] /following-sibling::div[./input[@id="name"]] ] diff --git a/src/Symfony/Component/Form/Tests/AbstractBootstrap4LayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractBootstrap4LayoutTest.php index ec97577818d4d..aa0600e58fa3e 100644 --- a/src/Symfony/Component/Form/Tests/AbstractBootstrap4LayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractBootstrap4LayoutTest.php @@ -32,14 +32,12 @@ public function testRow() [ ./label[@for="name"] [ - ./div[ - ./ul - [./li - [./span[.="[trans]Error[/trans]"]] - [./span[.="[trans]Error![/trans]"]] - ] - [count(./li)=1] - ] + ./span[@class="alert alert-danger"] + [./span[@class="mb-0 d-block"] + [./span[.="[trans]Error[/trans]"]] + [./span[.="[trans]Error![/trans]"]] + ] + [count(./span)=1] ] /following-sibling::input[@id="name"] ] @@ -162,22 +160,18 @@ public function testErrors() $html = $this->renderErrors($view); $this->assertMatchesXpath($html, -'/div +'/span [@class="alert alert-danger"] [ - ./ul - [@class="list-unstyled mb-0"] - [ - ./li - [./span[.="[trans]Error[/trans]"]] - [./span[.="[trans]Error 1[/trans]"]] - - /following-sibling::li - [./span[.="[trans]Error[/trans]"]] - [./span[.="[trans]Error 2[/trans]"]] - ] - [count(./li)=2] + ./span[@class="mb-0 d-block"] + [./span[.="[trans]Error[/trans]"]] + [./span[.="[trans]Error 1[/trans]"]] + + /following-sibling::span[@class="mb-0 d-block"] + [./span[.="[trans]Error[/trans]"]] + [./span[.="[trans]Error 2[/trans]"]] ] + [count(./span)=2] ' ); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy