summaryrefslogtreecommitdiff
path: root/django/forms/formsets.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms/formsets.py')
-rw-r--r--django/forms/formsets.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/forms/formsets.py b/django/forms/formsets.py
index 6400e4a67f..166a6adaeb 100644
--- a/django/forms/formsets.py
+++ b/django/forms/formsets.py
@@ -161,6 +161,10 @@ class BaseFormSet(object):
'auto_id': self.auto_id,
'prefix': self.add_prefix(i),
'error_class': self.error_class,
+ # Don't render the HTML 'required' attribute as it may cause
+ # incorrect validation for extra, optional, and deleted
+ # forms in the formset.
+ 'use_required_attribute': False,
}
if self.is_bound:
defaults['data'] = self.data
@@ -195,6 +199,7 @@ class BaseFormSet(object):
auto_id=self.auto_id,
prefix=self.add_prefix('__prefix__'),
empty_permitted=True,
+ use_required_attribute=False,
**self.get_form_kwargs(None)
)
self.add_fields(form, None)