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 1928faf

Browse filesBrowse files
committed
feature #26330 [FORM] Fix HTML errors. (Nyholm)
This PR was merged into the 4.1-dev branch. Discussion ---------- [FORM] Fix HTML errors. | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | As mentioned in #26328. Range and color do not support "required" attribute Commits ------- f75d8c1 Fix HTML errors.
2 parents 4c98001 + f75d8c1 commit 1928faf
Copy full SHA for 1928faf

File tree

1 file changed

+4
-0
lines changed
Filter options

1 file changed

+4
-0
lines changed

‎src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
{%- block form_widget_simple -%}
1212
{%- set type = type|default('text') -%}
13+
{%- if type == 'range' or type == 'color' -%}
14+
{# Attribute "required" is not supported #}
15+
{%- set required = false -%}
16+
{%- endif -%}
1317
<input type="{{ type }}" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
1418
{%- endblock form_widget_simple -%}
1519

0 commit comments

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