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.
npm i russian-requisites-validation
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);
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);
The scripts and documentation in this project are released under the MIT License