1
0
mirror of https://github.com/django/django.git synced 2025-10-25 14:46:09 +00:00

[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
This commit is contained in:
Jannis Leidel
2010-01-17 22:51:25 +00:00
parent abea4e6ee3
commit d1e7fdea3f
2 changed files with 6 additions and 1 deletions

View File

@@ -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!']
"""