1.0.1 • Published 6 years ago

validate-polish-regon v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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
1.0.1

6 years ago

1.0.0

6 years ago