PHPackages                             alexeevdv/yii2-kz-personalid - 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. alexeevdv/yii2-kz-personalid

ActiveYii2-extension[Validation &amp; Sanitization](/categories/validation)

alexeevdv/yii2-kz-personalid
============================

1.4.4(8y ago)03.3kMITPHP

Since Jun 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/alexeevdv/yii2-kz-personalid)[ Packagist](https://packagist.org/packages/alexeevdv/yii2-kz-personalid)[ RSS](/packages/alexeevdv-yii2-kz-personalid/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (9)Used By (0)

yii2-kz-personalid
==================

[](#yii2-kz-personalid)

[![Build Status](https://camo.githubusercontent.com/b6417cbd9d4341a6622f373c9ea240b38e1274d02a818b1ab2ab7807c776fd04/68747470733a2f2f7472617669732d63692e6f72672f616c657865657664762f796969322d6b7a2d706572736f6e616c69642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alexeevdv/yii2-kz-personalid)[![codecov](https://camo.githubusercontent.com/2b691fa41f1b9aa9ba77fd81c9d7bba1051f00d3d0ccade22a3f3a8a21121f4c/68747470733a2f2f636f6465636f762e696f2f67682f616c657865657664762f796969322d6b7a2d706572736f6e616c69642f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/alexeevdv/yii2-kz-personalid)[![PHP 5.6](https://camo.githubusercontent.com/02377f76b3cbe5c9bd3bc047522682376deaab69a4aed013b4a00018e068db72/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e362d677265656e2e737667)](https://camo.githubusercontent.com/02377f76b3cbe5c9bd3bc047522682376deaab69a4aed013b4a00018e068db72/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e362d677265656e2e737667)[![PHP 7.0](https://camo.githubusercontent.com/28174979e725b1f51a3ddc2a37022bd139e49d42f64fdc7b9322b3e5a15a3f7c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e302d677265656e2e737667)](https://camo.githubusercontent.com/28174979e725b1f51a3ddc2a37022bd139e49d42f64fdc7b9322b3e5a15a3f7c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e302d677265656e2e737667)[![PHP 7.1](https://camo.githubusercontent.com/89830e985e0a7f5f1ed58d412d81ee5bdccafb5dd5861eb9a6e63e44dde568b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e312d677265656e2e737667)](https://camo.githubusercontent.com/89830e985e0a7f5f1ed58d412d81ee5bdccafb5dd5861eb9a6e63e44dde568b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e312d677265656e2e737667)[![PHP 7.2](https://camo.githubusercontent.com/047bbe011ab372b4d00fc7ab0ed6f0d2a3db1ffda3a25de65f318dac100328ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e322d677265656e2e737667)](https://camo.githubusercontent.com/047bbe011ab372b4d00fc7ab0ed6f0d2a3db1ffda3a25de65f318dac100328ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e322d677265656e2e737667)

Yii2 extension to deal with [Kazakhstan personal identification number](https://ru.wikipedia.org/wiki/%D0%98%D0%BD%D0%B4%D0%B8%D0%B2%D0%B8%D0%B4%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9_%D0%B8%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80)

It contains:

- Both server-side and client-side validators
- Helper to fetch data from identification number

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require alexeevdv/yii2-kz-personalid "~1.0"

```

or add

```
"alexeevdv/yii2-kz-personalid": "~1.0"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

### Validation

[](#validation)

#### As standalone validator

[](#as-standalone-validator)

```
use alexeevdv\kz\PersonalidValidator;

//...
$validator = new PersonalidValidator;
$result = $validator->validateValue('123456789012');
//...
```

### In model

[](#in-model)

```
use alexeevdv\kz\PersonalidValidator;

public function rules()
{
    //...
    ['personalid', PersonalidValidator::class, 'message' => 'Wrong personalid value!'],
    //...
}
```

### Helper

[](#helper)

```
use alexeevdv\kz\PersonalidHelper;

$personalid = '850407301166';

/** @var \DateTime $birtdate = 1985-04-07 */
$birtdate = PersonalidHelper::getBirthDate($personalid);

/** @var int $sex = PersonalidHelper::SEX_MALE */
$sex = PersonalidHelper::getSex($personalid);

/** @var string $serialNumber = 0116 */
$serialNumber = PersonalidHelper::getSerialNumber($personalid);
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

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 ~35 days

Recently: every ~61 days

Total

8

Last Release

3005d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e6f71682c6a273973ad9c29d60ddac6d3cc55db7e55ec4f5638115f4c22409f6?d=identicon)[alexeevdv](/maintainers/alexeevdv)

---

Top Contributors

[![alexeevdv](https://avatars.githubusercontent.com/u/597839?v=4)](https://github.com/alexeevdv "alexeevdv (19 commits)")

---

Tags

kzpersonalidentityvalidatoryii2yii2-extension

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/alexeevdv-yii2-kz-personalid/health.svg)

```
[![Health](https://phpackages.com/badges/alexeevdv-yii2-kz-personalid/health.svg)](https://phpackages.com/packages/alexeevdv-yii2-kz-personalid)
```

###  Alternatives

[borales/yii2-phone-input

Yii2 International telephone numbers - Asset Bundle, Behavior, Validator, Widget

1341.6M6](/packages/borales-yii2-phone-input)[codeonyii/yii2-at-least-validator

Validates at least one (or more) attributes.

28253.5k1](/packages/codeonyii-yii2-at-least-validator)[arogachev/yii2-many-to-many

Many-to-many ActiveRecord relation for Yii 2 framework

3541.2k4](/packages/arogachev-yii2-many-to-many)[yiibr/yii2-br-validator

Provide validations and features for brazilian localization

14103.2k4](/packages/yiibr-yii2-br-validator)[yii2mod/yii2-validators

Collection of useful validators for Yii Framework 2.0

1816.8k](/packages/yii2mod-yii2-validators)

PHPackages © 2026

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