PHPackages                             anper/russian-id - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. anper/russian-id

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

anper/russian-id
================

Простой валидатор для идентификаторов российских физических и юридических лиц. Проверяет только checksum.

v2.1.0(4y ago)214.3k↓20.2%1MITPHPPHP ^7.1||^8.0CI failing

Since Jun 29Pushed 4y agoCompare

[ Source](https://github.com/perevoshchikov/russian-id)[ Packagist](https://packagist.org/packages/anper/russian-id)[ Docs](https://github.com/perevoshchikov/russian-id)[ RSS](/packages/anper-russian-id/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (6)Used By (1)

Anper\\RussianId
================

[](#anperrussianid)

[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Latest Version on Packagist](https://camo.githubusercontent.com/05458ccfcff8ed9bfe8c100e914d18269ee039fb1bf64d0d66a6bebb7212472c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e7065722f7275737369616e2d69642e737667)](https://packagist.org/packages/anper/russian-id)[![Build Status](https://github.com/perevoshchikov/russian-id/actions/workflows/build.yml/badge.svg)](https://github.com/perevoshchikov/russian-id/actions/workflows/build.yml)

Простой валидатор для идентификаторов российских физических и юридических лиц. Проверяет только checksum.

Supports
--------

[](#supports)

- БИК
- Расчётный счёт
- Корреспондентский счёт
- ИНН
- КПП
- ОГРН/ОГРНИП
- ЕМП ОМС
- СНИЛС

Install
-------

[](#install)

```
$ composer require anper/russian-id
```

Basic usage
-----------

[](#basic-usage)

```
use Anper\RussianId\Validator;

Validator::isBik($bik);
Validator::isRs($bik, $rs);
Validator::isKs($bik, $ks);
Validator::isInn($inn);
Validator::isPersonInn($inn);
Validator::isLegalInn($inn);
Validator::isKpp($kpp);
Validator::isOgrn($ogrn);
Validator::isOgrnip($ogrnip);
Validator::isOgrnOrOgrnip($ogrnOrOgrnip);
Validator::isOms($oms);
Validator::isSnils($snils);
```

Assertion
---------

[](#assertion)

```
use Anper\RussianId\Assert;
use Anper\RussianId\InvalidArgumentException;

try {
    Assert::bik($bik);
    Assert::rs($bik, $rs);
    Assert::ks($bik, $ks);
    Assert::inn($inn);
    Assert::personInn($inn);
    Assert::legalInn($inn);
    Assert::kpp($kpp);
    Assert::ogrn($ogrn);
    Assert::ogrnip($ogrnip);
    Assert::ogrnOrOgrnip($ogrnOrOgrnip);
    Assert::oms($oms);
    Assert::snils($snils);
} catch (InvalidArgumentException $e) {
    // invalid
}
```

Test
----

[](#test)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~206 days

Total

5

Last Release

1736d ago

Major Versions

v1.1.0 → v2.0.02021-06-21

PHP version history (2 changes)v1.0.0PHP ~7.1

v1.1.0PHP ^7.1||^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13899175?v=4)[Anton Perevoshchikov](/maintainers/perevoshchikov)[@perevoshchikov](https://github.com/perevoshchikov)

---

Top Contributors

[![perevoshchikov](https://avatars.githubusercontent.com/u/13899175?v=4)](https://github.com/perevoshchikov "perevoshchikov (47 commits)")

---

Tags

checkverifyvalidatechecksumEMPrsINNкппогрнснилсbikomsksorgnorgnipрасчётнный счёткорреспондентский счётОГРНИП

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/anper-russian-id/health.svg)

```
[![Health](https://phpackages.com/badges/anper-russian-id/health.svg)](https://phpackages.com/packages/anper-russian-id)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k930.0M1.6k](/packages/webmozart-assert)[giggsey/libphonenumber-for-php

A library for parsing, formatting, storing and validating international phone numbers, a PHP Port of Google's libphonenumber.

5.0k159.6M526](/packages/giggsey-libphonenumber-for-php)[symfony/validator

Provides tools to validate values

2.7k306.4M4.1k](/packages/symfony-validator)[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B13.9k](/packages/symfony-console)[symfony/http-foundation

Defines an object-oriented layer for the HTTP specification

8.7k928.6M6.5k](/packages/symfony-http-foundation)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
