diff options
| author | Jannis Leidel <jannis@leidel.info> | 2010-01-17 22:51:25 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2010-01-17 22:51:25 +0000 |
| commit | d1e7fdea3fe3e4dd28301151ef4e83fe2a2d0a1c (patch) | |
| tree | bd1632f2000e8f4e3fb5af15e3a74ffa08cd96cc /tests/regressiontests/forms | |
| parent | abea4e6ee3e87e384fb36cbdad0f7fb0b836dd49 (diff) | |
[1.1.X] Fixed #12017 - Overriding the default error message of the UKPostcodeField works again. Backport of r12044 and r12249.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms')
| -rw-r--r-- | tests/regressiontests/forms/localflavor/uk.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/localflavor/uk.py b/tests/regressiontests/forms/localflavor/uk.py index 258c22e5a9..d041e8f179 100644 --- a/tests/regressiontests/forms/localflavor/uk.py +++ b/tests/regressiontests/forms/localflavor/uk.py @@ -58,4 +58,9 @@ u'BT32 4PX' u'' >>> f.clean('') u'' +>>> f = UKPostcodeField(error_messages={'invalid': 'Enter a bloody postcode!'}) +>>> f.clean('1NV 4L1D') +Traceback (most recent call last): +... +ValidationError: [u'Enter a bloody postcode!'] """ |
