PHPackages                             vonlab/kz-iin - 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. vonlab/kz-iin

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

vonlab/kz-iin
=============

A library for generating and validating Kazakh Individual Identification Numbers (IIN).

v1.0.5(1y ago)033↓100%MITPHPPHP ^8.1

Since Jun 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/vonlab/kz-iin)[ Packagist](https://packagist.org/packages/vonlab/kz-iin)[ RSS](/packages/vonlab-kz-iin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

KzIIN Library
=============

[](#kziin-library)

[![Latest Stable Version](https://camo.githubusercontent.com/0a134030b11b786443a973a07997eca29067ae726396c1e5dbfa1c44adc2e22b/68747470733a2f2f706f7365722e707567782e6f72672f766f6e6c61622f6b7a2d69696e2f762f737461626c65)](https://packagist.org/packages/vonlab/kz-iin)[![License](https://camo.githubusercontent.com/28a7249d0ab1e9d6ac6735afd5b6b5f6da8f8461103573b25a9d04d2b99e4b24/68747470733a2f2f706f7365722e707567782e6f72672f766f6e6c61622f6b7a2d69696e2f6c6963656e7365)](https://packagist.org/packages/vonlab/kz-iin)[![PHP Version Require](https://camo.githubusercontent.com/4f73d790facf61d97f8bd1e9a63dbab250c636ec6816bc53975e774dbddc56ca/687474703a2f2f706f7365722e707567782e6f72672f766f6e6c61622f6b7a2d69696e2f726571756972652f706870)](https://packagist.org/packages/vonlab/kz-iin)[![Coverage Status](https://camo.githubusercontent.com/a8f479055d7d1d81aa44ee7f7b0d4ad7679f94031d1cb23d55faf7bf8eb1daa8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f766f6e6c61622f6b7a2d69696e2f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/vonlab/kz-iin?branch=main)

This library provides tools for validating, parsing, and generating Kazakhstan Individual Identification Numbers (IIN).

About Kazakhstan IIN
--------------------

[](#about-kazakhstan-iin)

In Kazakhstan, the Individual Identification Number (IIN) is a unique identifier assigned to individuals. The IIN is composed of 12 digits, where each digit represents specific information about the individual, such as the date of birth, gender, and a unique identifier for individuals born on the same date. More detailed information about the structure and purpose of the IIN can be found [here](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).

Features
--------

[](#features)

- Validate Kazakhstan IINs
- Parse Kazakhstan IINs to extract useful information
- Generate valid Kazakhstan IINs
- Exception handling for various validation errors

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

[](#installation)

You can install the package via composer:

```
composer require vonlab/kz-iin
```

Usage
-----

[](#usage)

### Validating an IIN

[](#validating-an-iin)

To validate an IIN, use the `IinValidator` class.

#### With Exception Handling

[](#with-exception-handling)

```
