peselx

Elixir parser and validator for PESEL numbers

PESEL number

PESEL is Polish national ID number. It has specific structure:

Birth date Serial Sex Control digit
440514 014 5 8

Birth date

Birth date in number has format yymmdd.

Sex

Even for girls odd for boys. Easy :)

Control digit

To calculate control digit we need:

If result is 0 OR 10 if modulo gives 0 then PESEL is valid.

Weigths

Weights for calculating CD:

A B C D E F G H I J
1 3 7 9 1 3 7 9 1 3

Usage

iex> Peselx.validate("04231115629")
{:ok, "Valid"}

Change in branching model

To remember. Rules of branching:

Use merge --no-ff to close branch.

Varia

MASTER – Build Status – MASTER

release-0.2.0 – Build Status – 0.2.0

release-0.3.0 – Build Status – 0.3.0