diff --git a/django/forms/models.py b/django/forms/models.py
index 7f49324..6a9fbf5 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -377,6 +377,50 @@ class BaseModelFormSet(BaseFormSet):
                     form.save_m2m()
             self.save_m2m = save_m2m
         return self.save_existing_objects(commit) + self.save_new_objects(commit)
+    
+    def clean(self):
+        self.validate_unique()
+    
+    def validate_unique(self):
+        from django.db.models.fields import FieldDoesNotExist
+        unique_checks = []
+        for name, field in self.forms[0].fields.iteritems():
+            try:
+                f = self.forms[0].instance._meta.get_field_by_name(name)[0]
+            except FieldDoesNotExist:
+                continue
+            if f.unique:
+                unique_checks.append((name,))
+        unique_together = self.forms[0].instance._meta.unique_together[:]
+        unique_together = [check for check in unique_together if [True for field in check if field in self.forms[0].fields]]
+        unique_checks.extend(unique_together)
+        
+        bad_fields = set()
+        for unique_check in unique_checks:
+            data = set()
+            for i in xrange(self._total_form_count):
+                form = self.forms[i]
+                if not hasattr(form, 'cleaned_data'):
+                    continue
+                if [True for field in unique_check if field in form.cleaned_data and form.cleaned_data[field] is not None]:
+                    if tuple([form.cleaned_data[field] for field in unique_check]) in data:
+                        bad_fields.add(unique_check)
+                        break
+                    else:
+                        data.add(tuple([form.cleaned_data[field] for field in unique_check]))
+        
+        if bad_fields:
+            errors = []
+            for field in bad_fields:
+                if len(field) == 1:
+                    errors.append(_(u"You have entered duplicate data for %(field)s, all %(field)ss should be unique." % {
+                            'field': get_text_list(field, _("and")),
+                        }))
+                else:
+                    errors.append(_(u"You have entered duplicate data for %(fields)s, %(fields)ss should be unique together." % {
+                            'fields': get_text_list(field, _("and")),
+                        }))
+            raise ValidationError(errors)
 
     def save_existing_objects(self, commit=True):
         self.changed_objects = []
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
index ad3fe02..f2875ff 100644
--- a/docs/topics/forms/modelforms.txt
+++ b/docs/topics/forms/modelforms.txt
@@ -538,6 +538,16 @@ in a view. The only difference is that we call ``formset.save()`` to save the
 data into the database. This is described above in
 :ref:`saving-objects-in-the-formset`.
 
+Overiding ``clean()`` on a ``model_formset``
+--------------------------------------------
+
+Just like with ``ModelForms``, by default the ``clean()`` method of a 
+``model_formset`` will validate that none of the items in the formset validate 
+the unique constraints on your model(either unique or unique_together).  If you 
+want to overide the ``clean()`` method on a ``model_formset`` and maintain this 
+validation, you must call the parent classes ``clean`` method.
+
+
 Using ``inlineformset_factory``
 -------------------------------
 
diff --git a/tests/modeltests/model_formsets/models.py b/tests/modeltests/model_formsets/models.py
index 4bf7b40..8c674b5 100644
--- a/tests/modeltests/model_formsets/models.py
+++ b/tests/modeltests/model_formsets/models.py
@@ -777,4 +777,32 @@ True
 >>> formset.get_queryset()
 [<Player: Bobby>]
 
+# Prevent duplicates from within the same formset
+>>> FormSet = modelformset_factory(Product, extra=2)
+>>> data = {
+...     'form-TOTAL_FORMS': 2,
+...     'form-INITIAL_FORMS': 0,
+...     'form-0-slug': 'red_car',
+...     'form-1-slug': 'red_car',
+... }
+>>> formset = FormSet(data)
+>>> formset.is_valid()
+False
+>>> formset._non_form_errors
+[u'You have entered duplicate data for slug, all slugs should be unique.']
+
+>>> FormSet = modelformset_factory(Price, extra=2)
+>>> data = {
+...     'form-TOTAL_FORMS': 2,
+...     'form-INITIAL_FORMS': 0,
+...     'form-0-price': '25',
+...     'form-0-quantity': '7',
+...     'form-1-price': '25',
+...     'form-1-quantity': '7',
+... }
+>>> formset = FormSet(data)
+>>> formset.is_valid()
+False
+>>> formset._non_form_errors
+[u'You have entered duplicate data for price and quantity, price and quantitys should be unique together.']
 """}
