PHPackages                             raigu/personal-code-validation - 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. raigu/personal-code-validation

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

raigu/personal-code-validation
==============================

Estonian person identification code validation

v2.5.0(2mo ago)04441MITPHPPHP ^7.0|^8.0

Since Sep 29Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/raigu/personal-code-validation)[ Packagist](https://packagist.org/packages/raigu/personal-code-validation)[ RSS](/packages/raigu-personal-code-validation/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (12)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/382d876c4c845dbcd0171a3c416e35219487c443a9ceb820a3d8d26c1e498fdd/68747470733a2f2f706f7365722e707567782e6f72672f72616967752f706572736f6e616c2d636f64652d76616c69646174696f6e2f762f737461626c65)](https://packagist.org/packages/raigu/personal-code-validation)[![GitHub license](https://camo.githubusercontent.com/87fc060649f118a05cfe91637daf813adfeae7f833788da9851ce128cc00a1d1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f72616967752f706572736f6e616c2d636f64652d76616c69646174696f6e)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/e1bd8e12f13b88dff5cdc69490d18fccc5b48e94a80a529bbc5ddb895aeb305c/68747470733a2f2f706f7365722e707567782e6f72672f72616967752f706572736f6e616c2d636f64652d76616c69646174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/raigu/personal-code-validation)[![build](https://github.com/raigu/personal-code-validation/workflows/build/badge.svg)](https://github.com/raigu/personal-code-validation/actions?query=workflow%3Abuild)

Estonian person identification code validation
==============================================

[](#estonian-person-identification-code-validation)

Validation of Estonian personal identification code according to the standard [EVS 585:2007 Personal code. Structure](https://www.evs.ee/products/evs-585-2007).

Compatibility
=============

[](#compatibility)

PHP 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5

Motivation
==========

[](#motivation)

I needed a validation that states it fallows the official standard. I bought the standard from Estonian Centre for Standardisation and worked it through.

I needed a package with long time support. It has no other dependencies and is tested against all supported PHP versions in [GitHub Action](https://github.com/raigu/personal-code-validation/actions).

Install
=======

[](#install)

```
$ composer require raigu/personal-code-validation
```

Usage
=====

[](#usage)

Validation of personal code:

```
require_once 'vendor/autoload.php';

if (\Raigu\is_valid_personal_code('00000000000')) {
    echo "Valid\n";
} else {
    echo "Invalid\n";
}
```

Calculation of personal code's control number:

```
echo \Raigu\personal_code_control_number('1234567890') . "\n";
echo \Raigu\personal_code_control_number('12345678901') . "\n";
```

will output:

```
2
2

```

Testing
=======

[](#testing)

```
$ composer test
```

License
=======

[](#license)

Licensed under [MIT](LICENSE.md)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance83

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity69

Established project with proven stability

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

Recently: every ~449 days

Total

8

Last Release

86d ago

Major Versions

v1.0.1 → v2.0.02020-05-23

PHP version history (2 changes)v1.0.0PHP ^7.0

v2.1.0PHP ^7.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/82bf3ac844b3984ae4f9965188829da1729ca1e86abd92151406d15896c021b9?d=identicon)[raigu](/maintainers/raigu)

---

Tags

codeestoniaestonianpersonalphpprivatevalidation

### Embed Badge

![Health badge](/badges/raigu-personal-code-validation/health.svg)

```
[![Health](https://phpackages.com/badges/raigu-personal-code-validation/health.svg)](https://phpackages.com/packages/raigu-personal-code-validation)
```

###  Alternatives

[webmozart/assert

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

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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