Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #3879 -- Updated Norwegian social security validation rules. Th…

…anks,

bp@datakortet.no.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a599f1234eb7e511aa2c0766873750ad70390aaf 1 parent b11454d
@malcolmt malcolmt authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 django/contrib/localflavor/no/forms.py
View
6 django/contrib/localflavor/no/forms.py
@@ -46,10 +46,12 @@ def clean(self, value):
try:
if 000 <= inum < 500:
self.birthday = datetime.date(1900+year2, month, day)
- if 500 <= inum < 750:
+ if 500 <= inum < 750 and year2 > 54:
self.birthday = datetime.date(1800+year2, month, day)
- if 500 <= inum < 1000:
+ if 500 <= inum < 1000 and year2 < 40:
self.birthday = datetime.date(2000+year2, month, day)
+ if 900 <= inum < 1000 and year2 > 39:
+ self.birthday = datetime.date(1900+year2, month, day)
except ValueError:
raise ValidationError(msg)

0 comments on commit a599f12

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