Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1fb80e7

Browse filesBrowse files
committed
bug #39099 [Form] ignore the pattern attribute for textareas (xabbuh)
This PR was merged into the 4.4 branch. Discussion ---------- [Form] ignore the pattern attribute for textareas | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #39066 | License | MIT | Doc PR | Commits ------- e7698e7 ignore the pattern attribute for textareas
2 parents d558964 + e7698e7 commit 1fb80e7
Copy full SHA for 1fb80e7

File tree

Expand file treeCollapse file tree

4 files changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+4
-3
lines changed

‎src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2379,7 +2379,7 @@ public function testTextarea()
23792379
$this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']],
23802380
'/textarea
23812381
[@name="name"]
2382-
[@pattern="foo"]
2382+
[not(@pattern)]
23832383
[@class="my&class form-control"]
23842384
[.="foo&bar"]
23852385
'

‎src/Symfony/Bridge/Twig/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
2727
"symfony/error-handler": "^4.4|^5.0",
2828
"symfony/finder": "^3.4|^4.0|^5.0",
29-
"symfony/form": "^4.3.5",
29+
"symfony/form": "^4.4.17",
3030
"symfony/http-foundation": "^4.3|^5.0",
3131
"symfony/http-kernel": "^4.4",
3232
"symfony/mime": "^4.3|^5.0",

‎src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/TextareaType.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class TextareaType extends AbstractType
2323
public function buildView(FormView $view, FormInterface $form, array $options)
2424
{
2525
$view->vars['pattern'] = null;
26+
unset($view->vars['attr']['pattern']);
2627
}
2728

2829
/**

‎src/Symfony/Component/Form/Tests/AbstractLayoutTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/AbstractLayoutTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2068,7 +2068,7 @@ public function testTextarea()
20682068
$this->assertWidgetMatchesXpath($form->createView(), [],
20692069
'/textarea
20702070
[@name="name"]
2071-
[@pattern="foo"]
2071+
[not(@pattern)]
20722072
[.="foo&bar"]
20732073
'
20742074
);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.