diff --git a/tests/modeltests/model_formsets/models.py b/tests/modeltests/model_formsets/models.py
index ae15244..abef770 100644
--- a/tests/modeltests/model_formsets/models.py
+++ b/tests/modeltests/model_formsets/models.py
@@ -62,6 +62,16 @@ class BookWithOptionalAltEditor(models.Model):
         return self.title

 @python_2_unicode_compatible
+class BookWithOptionalISBN(models.Model):
+    author = models.ForeignKey(Author)
+    title = models.CharField(max_length=100)
+    isbn = models.CharField(max_length=100, null=True, blank=True, unique=True)
+    priority = models.IntegerField(null=True, blank=True, unique=True)
+
+    def __str__(self):
+        return self.title
+
+@python_2_unicode_compatible
 class AlternateBook(Book):
     notes = models.CharField(max_length=100)

diff --git a/tests/modeltests/model_formsets/tests.py b/tests/modeltests/model_formsets/tests.py
index 037163b..951f22f 100644
--- a/tests/modeltests/model_formsets/tests.py
+++ b/tests/modeltests/model_formsets/tests.py
@@ -13,10 +13,10 @@ from django.test import TestCase, skipUnlessDBFeature
 from django.utils import six

 from .models import (Author, BetterAuthor, Book, BookWithCustomPK,
-    BookWithOptionalAltEditor, AlternateBook, AuthorMeeting, CustomPrimaryKey,
-    Place, Owner, Location, OwnerProfile, Restaurant, Product, Price,
-    MexicanRestaurant, ClassyMexicanRestaurant, Repository, Revision,
-    Person, Membership, Team, Player, Poet, Poem, Post)
+    BookWithOptionalAltEditor, BookWithOptionalISBN, AlternateBook,
+    AuthorMeeting, CustomPrimaryKey, Place, Owner, Location, OwnerProfile,
+    Restaurant, Product, Price, MexicanRestaurant, ClassyMexicanRestaurant,
+    Repository, Revision, Person, Membership, Team, Player, Poet, Poem, Post)


 class DeletionTests(TestCase):
@@ -639,6 +639,56 @@ class ModelFormsetTest(TestCase):
         self.assertEqual(book2.author_id, 1)
         self.assertEqual(book2.title, 'Les Fleurs du Mal')

+    def test_inline_formsets_with_nullable_unique(self):
+        """
+        Fields that have null=True and have None should be excluded from unique
+        checks. However, you cannot pass in None values via HTML rendered
+        forms. "Most" to_python methods will make it an empty string instead.
+        """
+
+        AuthorBooksFormSet = inlineformset_factory(Author, BookWithOptionalISBN, can_delete=False, extra=2)
+        author = Author.objects.create(pk=1, name='Charles Baudelaire')
+
+        # Empty unique/nullable isbn (CharField)
+        data = {
+            'bookwithoptionalisbn_set-TOTAL_FORMS': '2', # the number of forms rendered
+            'bookwithoptionalisbn_set-INITIAL_FORMS': '0', # the number of forms with initial data
+            'bookwithoptionalisbn_set-MAX_NUM_FORMS': '', # the max number of forms
+            'bookwithoptionalisbn_set-0-author': '1',
+            'bookwithoptionalisbn_set-0-priority': '1',
+            'bookwithoptionalisbn_set-0-title': 'Het gouden ei',
+            'bookwithoptionalisbn_set-1-author': '1',
+            'bookwithoptionalisbn_set-1-priority': '2',
+            'bookwithoptionalisbn_set-1-title': 'Fokke en Sukke',
+            }
+        formset = AuthorBooksFormSet(data, instance=author)
+        self.assertFalse(formset.is_valid(), formset.errors)
+
+        # Empty unique/nullable priority (IntegerField)
+        data = {
+            'bookwithoptionalisbn_set-TOTAL_FORMS': '2', # the number of forms rendered
+            'bookwithoptionalisbn_set-INITIAL_FORMS': '0', # the number of forms with initial data
+            'bookwithoptionalisbn_set-MAX_NUM_FORMS': '', # the max number of forms
+            'bookwithoptionalisbn_set-0-author': '1',
+            'bookwithoptionalisbn_set-0-isbn': '1234',
+            'bookwithoptionalisbn_set-0-title': 'Het gouden ei',
+            'bookwithoptionalisbn_set-1-author': '1',
+            'bookwithoptionalisbn_set-1-isbn': '5678',
+            'bookwithoptionalisbn_set-1-title': 'Fokke en Sukke',
+            }
+        formset = AuthorBooksFormSet(data, instance=author)
+        self.assertTrue(formset.is_valid(), formset.errors)
+
+        saved = formset.save()
+        self.assertEqual(len(saved), 2)
+        book1, book2 = saved
+        self.assertEqual(book1.author_id, 1)
+        self.assertEqual(book1.title, 'Het gouden ei')
+        self.assertEqual(book1.priority, None)
+        self.assertEqual(book2.author_id, 1)
+        self.assertEqual(book2.title, 'Fokke en Sukke')
+        self.assertEqual(book2.priority, None)
+
     def test_inline_formsets_with_custom_save_method(self):
         AuthorBooksFormSet = inlineformset_factory(Author, Book, can_delete=False, extra=2)
         author = Author.objects.create(pk=1, name='Charles Baudelaire')
