russian-requisites-validation
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Russian data validation

Running Code Coverage Codecov npm version install size Libraries.io dependency status for latest release license styled with prettier


This is more modern realisation of this library written on typescript and published to the npm.

Validate inn, ogrn, ogrnip, snils, bik, kpp, correspondent and checking account.

More detail information about data validation here.

Installation

npm i russian-requisites-validation

Usage

Typescript

import { ResponseCode, Validation } from 'russian-requisites-validation'

const validation = new Validation({ lng: 'ru' });
const response = validation.Inn(value);

console.log('valid: ', response === ResponseCode.Success);
console.log('error: ', response.message);
console.log('error code: ', response.code);

EcmaScript

import { ResponseCode, Validation } from 'russian-requisites-validation'

const validation = new Validation({ lng: 'ru' });
const response = validation.Inn(value);

console.log('valid: ', response === ResponseCode.Success);
console.log('error: ', response.message);
console.log('error code: ', response.code);

License

The scripts and documentation in this project are released under the MIT License

Package Sidebar

Install

npm i russian-requisites-validation

Weekly Downloads

12

Version

1.0.6

License

MIT

Unpacked Size

653 kB

Total Files

11

Last publish

Collaborators

  • halfi