Django

Code

Ticket #6291: 6291.diff

File 6291.diff, 1.4 kB (added by arien, 1 year ago)
  • django/contrib/localflavor/ca/forms.py

    old new  
    8080 
    8181    Checks the following rules to determine whether the number is valid: 
    8282 
    83         * Conforms to the XXX-XXX-XXXX format. 
     83        * Conforms to the XXX-XXX-XXX format. 
    8484        * Passes the check digit process "Luhn Algorithm" 
    8585             See: http://en.wikipedia.org/wiki/Social_Insurance_Number 
    8686    """ 
    8787    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.'), 
    8989    } 
    9090 
    9191    def clean(self, value): 
  • docs/localflavor.txt

    old new  
    181181---------------------------- 
    182182 
    183183A 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 
     184A valid number must have the format XXX-XXX-XXX and pass a `Luhn mod-10 
    185185checksum`_. 
    186186 
    187187.. _Luhn mod-10 checksum: http://en.wikipedia.org/wiki/Luhn_algorithm