pesel_validator library
Dart package for PESEL number validation
Enums
- Sex
- class that describes the person's sex
Functions
-
ageFromPesel(
{required String pesel}) → int - returns age from pesel number
-
dateOfBirthFromPesel(
{required String pesel}) → DateTime - returns date of birth from pesel number
-
sexFromPesel(
{required String pesel}) → Sex - returns sex from pesel number
-
validatePesel(
{required String pesel}) → bool - method that validates whether PESEL number is correct. returns true if pesel is correct, else false.
Exceptions / Errors
- InvalidPeselException
- Exception thrown when given pesel number is invalid