validate-polish-regon
v1.0.1
Published
regon
Downloads
6
Readme
Simple polish REGON validator
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