Skip to content

bafor/validate-polish

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

validate-polish

Validation of pesel, nip, regon, identity card etc.

npm install -g validate-polish

import validatePolish = require('validate-polish');

let pesel = "92060512181";
if (!validatePolish.pesel(pesel)) {
  throw new Error("Invalid pesel.");
}

let nip = "115667734";
if (!validatePolish.nip(nip)) {
  throw new Error("Invalid nip.");
}

let regon = "1251677";
if (!validatePolish.regon(regon)) {
  throw new Error("Invalid regon.");
}

let identityCard = "ATG3123151";
if (!validatePolish.identityCard(identityCard)) {
  throw new Error("Invalid nip.");
}

About

Validation of PESEL, NIP, REGON etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%