2.1.40 • Published 1 year ago
validate-polish v2.1.40
Table of contents
Getting Started
npm i validate-polish
Usage
General
import { validatePolish } from 'validate-polish';
if (!validatePolish.pesel(`92060512181`)) {
throw new Error(`Invalid pesel.`);
}
if (!validatePolish.nip('115667734')) {
throw new Error(`Invalid nip.`);
}
if (!validatePolish.regon(`1251677`)) {
throw new Error(`Invalid regon.`);
}
if (!validatePolish.identityCard(`14124142`)) {
throw new Error(`Invalid identity card.`);
}
Browser
In browser validate-polish package is wrapped twice validatePolish.validatePolish
.
<script src="https://cdn.jsdelivr.net/npm/validate-polish@latest/dist/index.browser.js"></script>
<script>
console.log(validatePolish.validatePolish);
</script>
Features
- CDN - available via cdn (https://cdn.jsdelivr.net/npm/validate-polish@latest/dist/index.browser.js)
- Cross-platform - works in Node.js, browser and with bundlers such as webpack
- Fast, lightweight, 0 dependencies - no dependencies ensure there are no security breaches from other packages
- Maintained - if you need additional functionality feel free to create PR or an Issue
- Strongly typed - library written fully in TypeScript
- Supports PESEL, REGON (9 and 14), NIP, IDENTITY CARD - also validates day and month correctness including century encoded in month.
- Tested - has tests on dozens of valid and invalid chunks of data to make sure validations are performed flawlessly
2.1.40
1 year ago
2.0.40
3 years ago
2.0.39
3 years ago
2.0.33
3 years ago
2.0.34
3 years ago
2.0.32
3 years ago
2.0.29
3 years ago
2.0.31
3 years ago
2.0.25
3 years ago
2.0.24
3 years ago
2.0.22
3 years ago
2.0.21
3 years ago
2.0.18
3 years ago
2.0.17
3 years ago
2.0.10-alpha.0
4 years ago
2.0.12-alpha.0
4 years ago
2.0.9
4 years ago
2.0.7
4 years ago
2.0.5
4 years ago
2.0.4
4 years ago
2.0.6
4 years ago
2.0.3
4 years ago
2.0.2
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.1.1
5 years ago
1.1.0
6 years ago
1.0.9
7 years ago
1.0.8
8 years ago
1.0.7
8 years ago