russian-requisites-validation
v1.0.6
Published
Russian legal data validation
Downloads
56
Maintainers
Readme
Russian data validation
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