arthurdejong / python-stdnum

A Python library to provide functions to handle, parse and validate standard numbers.
https://arthurdejong.org/python-stdnum/
GNU Lesser General Public License v2.1
495 stars 205 forks source link

Improve NIF validation #266

Closed DimitriPapadopoulos closed 3 years ago

arthurdejong commented 3 years ago

Hi @DimitriPapadopoulos ,

I merged your change as eeaf665 with a small change: the incorrect start digit will raise InvalidComponent instead of InvalidFormat (InvalidComponent is a little bit more descriptive).