Skip to content

Commit 1baa428

Browse files
sebastianblumweaverryan
authored andcommitted
added the example Twig Code for the HTML5 no novalidate attribute
in the form documentation, there is a notice about the no validate HTML5 attribute, but without the twig example. I added the twig code
1 parent 6af9d41 commit 1baa428

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

book/forms.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ corresponding errors printed out with the form.
420420
but are being prevented by your browser from, for example, submitting
421421
blank fields.
422422

423+
.. code-block:: html+jinja
424+
425+
{# src/Acme/DemoBundle/Resources/views/Default/new.html.twig #}
426+
{{ form(form, { 'attr': {'novalidate': 'novalidate' }}) }}
427+
423428
Validation is a very powerful feature of Symfony2 and has its own
424429
:doc:`dedicated chapter </book/validation>`.
425430

0 commit comments

Comments
 (0)