mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #22383 -- Added support for HTML5 required attribute on required form fields.
This commit is contained in:
parent
4d1c229ee5
commit
ec6121693f
28 changed files with 849 additions and 659 deletions
|
@ -1641,7 +1641,7 @@ class TestModelFormsetOverridesTroughFormMeta(TestCase):
|
|||
form = PoetFormSet.form()
|
||||
self.assertHTMLEqual(
|
||||
"%s" % form['name'],
|
||||
'<input id="id_name" maxlength="100" type="text" class="poet" name="name" />'
|
||||
'<input id="id_name" maxlength="100" type="text" class="poet" name="name" required />'
|
||||
)
|
||||
|
||||
def test_inlineformset_factory_widgets(self):
|
||||
|
@ -1652,7 +1652,7 @@ class TestModelFormsetOverridesTroughFormMeta(TestCase):
|
|||
form = BookFormSet.form()
|
||||
self.assertHTMLEqual(
|
||||
"%s" % form['title'],
|
||||
'<input class="book" id="id_title" maxlength="100" name="title" type="text" />'
|
||||
'<input class="book" id="id_title" maxlength="100" name="title" type="text" required />'
|
||||
)
|
||||
|
||||
def test_modelformset_factory_labels_overrides(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue