validate-polish-regon

1.0.1 • Public • Published

Simple polish REGON validator

NPM Version Build Status License Downloads

Validator check polish REGON number contains 9 or 14 digits.

Instalation

npm install validate-polish-regon

Simple using

For use validator you have to import 'validate-polish-regon' and call function with one argument - regon as number or string. REGON can contains spaces and dashes.

Validator always returns boolean value TRUE or FALSE.

Example:

const validate = require( 'validate-polish-regon' );
 
validate( '302690873' );      //true, regon contains of 9 digits
validate( '23511332857188' ); //true, regon contains of 14 digits
validate( '302-690-873' );    //true, allowed white chars and dashes
 
validate( '302690875' );      //false, invalid control digit
validate( '1234567890' );     //false, too more digits
validate( '12345678' );       //false, not enough digits

Readme

Keywords

Package Sidebar

Install

npm i validate-polish-regon

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • tomek-sochacki