All Projects → radarsu → validate-polish

radarsu / validate-polish

Licence: MIT License
Utility library for validation of PESEL, NIP, REGON, identity card etc. Aimed mostly at Polish enviroment. [Polish] Walidacja numerów pesel, nip, regon, dowodu osobistego.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to validate-polish

WonderfulPolishLanguage
This is a repository created for the list of resources for learning and exploring Wonderful Polish language.
Stars: ✭ 31 (+0%)
Mutual labels:  polish-language, polskie, polski
tiny-typed-emitter
Fully type-checked NodeJS EventEmitter
Stars: ✭ 96 (+209.68%)
Mutual labels:  typescript-library, nodejs-library
Gojs
JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.
Stars: ✭ 5,739 (+18412.9%)
Mutual labels:  javascript-library, typescript-library
FilterInputJs
Tiny and Powerful Library for limit an entry (text box,input) as number,string or more...
Stars: ✭ 37 (+19.35%)
Mutual labels:  javascript-library, validation-library
necktie
Necktie – a simple DOM binding tool
Stars: ✭ 43 (+38.71%)
Mutual labels:  javascript-library, typescript-library
sqlweb
SqlWeb is an extension of JsStore which allows to use sql query for performing database operation in IndexedDB.
Stars: ✭ 38 (+22.58%)
Mutual labels:  javascript-library, typescript-library
imtool
🖼️ Client-side canvas-based image manipulation library.
Stars: ✭ 38 (+22.58%)
Mutual labels:  javascript-library, typescript-library
orkid-node
Reliable and modern Redis Streams based task queue for Node.js 🤖
Stars: ✭ 61 (+96.77%)
Mutual labels:  typescript-library, nodejs-library
constant-time-js
Constant-time JavaScript functions
Stars: ✭ 43 (+38.71%)
Mutual labels:  javascript-library, typescript-library
validid
A Javascript library to validate ID card numbers of China, Taiwan, Hong Kong and South Korea
Stars: ✭ 37 (+19.35%)
Mutual labels:  javascript-library, identity-card
safe-touch
⛓ Runtime optional chaining for JS
Stars: ✭ 71 (+129.03%)
Mutual labels:  javascript-library, typescript-library
react-picture-annotation
A simple annotation component.
Stars: ✭ 53 (+70.97%)
Mutual labels:  javascript-library, typescript-library
rxjs-ninja
RxJS Operators for handling Observable strings, numbers, booleans and more
Stars: ✭ 68 (+119.35%)
Mutual labels:  javascript-library, typescript-library
jquery.skeleton.loader
A jQuery plugin to make screen skeleton loader.
Stars: ✭ 65 (+109.68%)
Mutual labels:  javascript-library
deno-aws api
From-scratch Typescript client for accessing AWS APIs
Stars: ✭ 33 (+6.45%)
Mutual labels:  typescript-library
validate
An extension to the popular library validate.js that adds some useful custom validations out of the box. Also, a hub for all custom validations, that we have created, so you can easily add them to your own project.
Stars: ✭ 31 (+0%)
Mutual labels:  javascript-library
aioneframework
Aione Framework: All-in-one lightweight mobile first front-end framework to design websites, web applications, mobile applications, progressive web applications having large number of examples, documentation, tutorials, community support, components.
Stars: ✭ 13 (-58.06%)
Mutual labels:  javascript-library
previewSlider
Responsive fullscreen image slider where the users are able to preview next/previous image when hovering over the navigation arrows.
Stars: ✭ 16 (-48.39%)
Mutual labels:  javascript-library
indexed-string-variation
Experimental JavaScript module to generate all possible variations of strings over an alphabet using an n-ary virtual tree
Stars: ✭ 16 (-48.39%)
Mutual labels:  javascript-library
avro-typescript
TypeScript Code Generator for Apache Avro Schema Types
Stars: ✭ 19 (-38.71%)
Mutual labels:  typescript-library

validate-polish

Utility library for validation of PESEL, NIP, REGON, identity card etc. Aimed mostly at Polish enviroment. [Polish] Walidacja numerów pesel, nip, regon, dowodu osobistego.

Table of contents

  1. Getting Started

  2. Usage

  3. Features

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].