﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
11577	PLNIPField validation error when empty	amz	nobody	"''PLNIPField'' from [source:django/trunk/django/contrib/localflavor/pl/forms.py] doesn't validate when not required:

{{{
Exception Type:	IndexError
Exception Value:	string index out of range
Exception Location:	/usr/lib/python2.5/site-packages/django/contrib/localflavor/pl/forms.py in has_valid_checksum, line 96
}}}

Re create:

{{{
#!python
class Client(models.Model):
    name = models.CharField(max_length=200, blank=True)
    nip = models.CharField(max_length=13, blank=True)

class ClientForm(forms.ModelForm):
    nip = PLNIPField(required=False)
}}}

Suggestion: Don't validate if submited date is empty (patch attached)
----
"	Bug	closed	contrib.localflavor	1.0	Normal	fixed			Accepted	1	0	1	1	0	0
