Skip to content

Small module providing function validating PESEL number (Polish personal ID)

License

Notifications You must be signed in to change notification settings

mswiecicki/pesel-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PESEL check

DONE (no more changes to the project anticipated)
unless some bugs or feature requests surface in the future

Small package aiming to do one thing, and one thing only: check PESEL.

PESEL is a Polish personal identification number consisting of 11 digits and encoding birthdate and sex of the owner.

While being principally unique and correct it is possible for legit (meaning copied from legal document)
PESEL to be duplicated or incorrect algorithm-wise.
That happens due to human error during registration or changing of PESEL number.

Usage

Nothing fancy - you pass a string to function and get boolean in return.

const isPeselValid = require('pesel-check');

isPeselValid('12345678901'); // => false (since '12345678901' isn't valid PESEL)
isPeselValid('11111111116'); // => true (since '11111111116' apparently is)

Function checks length, contents, birthdate and validates control sum.

About

Small module providing function validating PESEL number (Polish personal ID)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published