Skip to content

Commit 341f1e9

Browse files
committed
Fix HTML errors.
Range and color do not support "required" attribute
1 parent 619e403 commit 341f1e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Resources/views/Form/form_div_layout.html.twig

Lines 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)