mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #23075 -- Added documentation on novalidate attribute and made it default for admin
Thanks to sehmaschine for the report and to Tim Graham for the review.
This commit is contained in:
@@ -341,6 +341,16 @@ from that ``{{ form }}`` by Django's template language.
|
||||
directly tied to forms in templates, this tag is omitted from the
|
||||
following examples in this document.
|
||||
|
||||
.. admonition:: HTML5 input types and browser validation
|
||||
|
||||
If your form includes a :class:`~django.forms.URLField`, an
|
||||
:class:`~django.forms.EmailField` or any integer field type, Django will
|
||||
use the ``url``, ``email`` and ``number`` HTML5 input types. By default,
|
||||
browsers may apply their own validation on these fields, which may be
|
||||
stricter than Django's validation. If you would like to disable this
|
||||
behavior, set the `novalidate` attribute on the ``form`` tag, or specify
|
||||
a different widget on the field, like :class:`TextInput`.
|
||||
|
||||
We now have a working web form, described by a Django :class:`Form`, processed
|
||||
by a view, and rendered as an HTML ``<form>``.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user