djangosnippets.org: Latest snippets tagged with 'dni'http://djangosnippets.org/tags/dni/2011-06-15T17:41:00.443354-05:00Spanish National Identification Number Field (DNI)
2011-06-15T17:41:00.443354-05:00cues7ahttp://djangosnippets.org/snippets/2465/<p>This django field can be used to introduce Spanish national Identification Numbers (NIF). It validates the NIF format and checks if the last letter is correct.</p>
<p>It also validates NIE numbers for foreign people.</p>
<p>You can use the field in your own forms:</p>
<p>'code'
dni = DNIField(max_length=15, widget=forms.TextInput(), label=_('DNI'))
'code'</p>
Freely redistributable