Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #6291 -- Fixed error in CASocialInsuranceNumberField documentat…

…ion and error message. Thanks, jeff+django@ivany.org and arien

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f6336737a014b665b4c62bc89b01b7658824517c 1 parent aa72842
Adrian Holovaty authored January 02, 2008
4  django/contrib/localflavor/ca/forms.py
@@ -80,12 +80,12 @@ class CASocialInsuranceNumberField(Field):
80 80
 
81 81
     Checks the following rules to determine whether the number is valid:
82 82
 
83  
-        * Conforms to the XXX-XXX-XXXX format.
  83
+        * Conforms to the XXX-XXX-XXX format.
84 84
         * Passes the check digit process "Luhn Algorithm"
85 85
              See: http://en.wikipedia.org/wiki/Social_Insurance_Number
86 86
     """
87 87
     default_error_messages = {
88  
-        'invalid': ugettext('Enter a valid Canadian Social Insurance number in XXX-XXX-XXXX format.'),
  88
+        'invalid': ugettext('Enter a valid Canadian Social Insurance number in XXX-XXX-XXX format.'),
89 89
     }
90 90
 
91 91
     def clean(self, value):
2  docs/localflavor.txt
@@ -181,7 +181,7 @@ CASocialInsuranceNumberField
181 181
 ----------------------------
182 182
 
183 183
 A form field that validates input as a Canadian Social Insurance Number (SIN).
184  
-A valid number must have the format XXX-XXX-XXXX and pass a `Luhn mod-10
  184
+A valid number must have the format XXX-XXX-XXX and pass a `Luhn mod-10
185 185
 checksum`_.
186 186
 
187 187
 .. _Luhn mod-10 checksum: http://en.wikipedia.org/wiki/Luhn_algorithm
6  tests/regressiontests/forms/localflavor/ca.py
@@ -213,13 +213,13 @@
213 213
 >>> f.clean('046-454-287')
214 214
 Traceback (most recent call last):
215 215
 ...
216  
-ValidationError: [u'Enter a valid Canadian Social Insurance number in XXX-XXX-XXXX format.']
  216
+ValidationError: [u'Enter a valid Canadian Social Insurance number in XXX-XXX-XXX format.']
217 217
 >>> f.clean('046 454 286')
218 218
 Traceback (most recent call last):
219 219
 ...
220  
-ValidationError: [u'Enter a valid Canadian Social Insurance number in XXX-XXX-XXXX format.']
  220
+ValidationError: [u'Enter a valid Canadian Social Insurance number in XXX-XXX-XXX format.']
221 221
 >>> f.clean('046-44-286')
222 222
 Traceback (most recent call last):
223 223
 ...
224  
-ValidationError: [u'Enter a valid Canadian Social Insurance number in XXX-XXX-XXXX format.']
  224
+ValidationError: [u'Enter a valid Canadian Social Insurance number in XXX-XXX-XXX format.']
225 225
 """

0 notes on commit f633673

Please sign in to comment.
Something went wrong with that request. Please try again.