poliquin / brazilnum

Python functions for CNPJ, CEI, CPF, PIS/PASEP, CEP, and município numbers from Brazil.
MIT License
97 stars 10 forks source link

Account for smallest valid identifier #8

Closed poliquin closed 8 years ago

poliquin commented 8 years ago

The smallest valid CNPJ is 191; zero is not a valid identifier, but cnpj.validate_cnpj returns True:

>> from brazilnum import cnpj
>> cnpj.validate_cnpj(0)
True  # this should be False

This issue might affect other identifiers as well. Is 0 a valid CEI? If not, then the smallest valid CEI is 16.