Ticket #9697: django-contrib-localflavor-au-taxfilenumber.patch
File django-contrib-localflavor-au-taxfilenumber.patch, 776 bytes (added by , 16 years ago) |
---|
-
forms.py
39 39 return u'%s' % phone_match.group(1) 40 40 raise ValidationError(self.error_messages['invalid']) 41 41 42 class AUTaxFileNumber(RegexField): 43 """ 44 Australian Tax File Number (TFN). 45 """ 46 default_error_messages = { 47 'invalid': u'Tax File Numbers must be in ###-###-### format.', 48 } 49 50 def __init__(self, *args, **kwargs): 51 super(AUTaxFileNumberField, self).__init__( 52 r'^\d{3}-\d{3}-\d{3}$', max_length=None, min_length=None, *args, **kwargs) 53 42 54 class AUStateSelect(Select): 43 55 """ 44 56 A Select widget that uses a list of Australian states/territories as its