Django

Code

Show
Ignore:
Timestamp:
12/17/07 02:05:27 (1 year ago)
Author:
mtredinnick
Message:

Fixed #5871 -- Factored out the validation errors in localflavor form fields. Brings them into line with the standard newforms fields. Patch from Jan Rademaker.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/localflavor/sk/forms.py

    r5876 r6926  
    2727    Valid form is XXXXX or XXX XX, where X represents integer. 
    2828    """ 
     29    default_error_messages = { 
     30        'invalid': ugettext(u'Enter a postal code in the format XXXXX or XXX XX.'), 
     31    } 
     32 
    2933    def __init__(self, *args, **kwargs): 
    3034        super(SKPostalCodeField, self).__init__(r'^\d{5}$|^\d{3} \d{2}$', 
    31             max_length=None, min_length=None, 
    32             error_message=ugettext(u'Enter a postal code in the format XXXXX or XXX XX.'), 
    33             *args, **kwargs) 
     35            max_length=None, min_length=None, *args, **kwargs) 
    3436 
    3537    def clean(self, value):