diff --git a/django/forms/fields.py b/django/forms/fields.py
index 8e727b4..0c598dd 100644
a
|
b
|
class Field(object):
|
178 | 178 | result = copy.copy(self) |
179 | 179 | memo[id(self)] = result |
180 | 180 | result.widget = copy.deepcopy(self.widget, memo) |
| 181 | result.validators = self.validators[:] |
181 | 182 | return result |
182 | 183 | |
183 | 184 | class CharField(Field): |
diff --git a/tests/regressiontests/forms/tests/forms.py b/tests/regressiontests/forms/tests/forms.py
index 91db449..7f8fdcb 100644
a
|
b
|
class FormsTestCase(TestCase):
|
789 | 789 | f = Person() |
790 | 790 | self.assertEqual(f['gender'].field.choices, [('f', 'Female'), ('m', 'Male')]) |
791 | 791 | |
| 792 | def test_validators_independance(self): |
| 793 | """ Test that we are able to modify a form field validators list without polluting |
| 794 | other forms """ |
| 795 | from django.core.validators import MaxValueValidator |
| 796 | class MyForm(Form): |
| 797 | myfield = CharField(max_length=25) |
| 798 | |
| 799 | f1 = MyForm() |
| 800 | f2 = MyForm() |
| 801 | |
| 802 | f1.fields['myfield'].validators[0] = MaxValueValidator(12) |
| 803 | self.assertFalse(f1.fields['myfield'].validators[0] == f2.fields['myfield'].validators[0]) |
| 804 | |
792 | 805 | def test_hidden_widget(self): |
793 | 806 | # HiddenInput widgets are displayed differently in the as_table(), as_ul()) |
794 | 807 | # and as_p() output of a Form -- their verbose names are not displayed, and a |