Coder Social home page Coder Social logo

radarsu / validate-polish Goto Github PK

View Code? Open in Web Editor NEW
41.0 7.0 12.0 643 KB

Utility library for validation of PESEL, NIP, REGON, identity card etc. Aimed mostly at Polish enviroment. [Polish] Walidacja numerów pesel, nip, regon, dowodu osobistego.

License: MIT License

TypeScript 95.39% JavaScript 4.61%
validation-library polish polish-language polski polskie nip regon regon-validation pesel pesel-validation

validate-polish's People

Contributors

cxdezign avatar dependabot[bot] avatar radarsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

validate-polish's Issues

Incorrect validation of month

Hello,
I have noticed that in version 2.0.34 there was added month and day validation.
Unfortunately, it does not take into account the fact that in PESEL there is a century encoded in the month digits.
Basically, there is a possibility that month digits > 12, for all people born after 2000.

Example: PESEL 00320506835 returns false.
See https://en.wikipedia.org/wiki/PESEL for the algo.

Other than that - great job, thanks.

Regon validator

This pesel 71122506585 is recognized as valid regon. Regex for length shoud be 9 or 14 digits not range between {9, 14}

Relicensing proposal

Hi @radarsu, I've noticed that this library does not explicitly state what license does it use, however according to package.json it is supposed to be GPL-3.0 licensed. This license makes this library essentially useless for any larger project (commercial or not, except for GPL-licensed project obviously), because GPL is considered to be a viral license, forcing the code which uses it (in most cases) to also be licensed using GPL.

Would you consider relicensing your library to a more permissive license, eg. MIT, Apache or BSD-3-clause? Conversely, if this was not your intention to license it as GPL-3.0 (IANAL, but currently your code does not include the required copy of the GPL license), could you please include the desired license text and also update the package.json accordingly?

Pesel validation

Hi @radarsu! I have noticed that pesel validation has bug. If you validate pesel - 55558888888, it's gonna return true. Please make sure that pesel validation is checking also date because there is no 88th day of the month.
Cheers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.