1.0.6 • Published 2 years ago
russian-requisites-validation v1.0.6
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