raigu/personal-code-validation
Composer 安装命令:
composer require raigu/personal-code-validation
包简介
Estonian person identification code validation
README 文档
README
Estonian person identification code validation
Validation of Estonian personal identification code according to the standard EVS 585:2007 Personal code. Structure.
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
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.
Install
$ composer require raigu/personal-code-validation
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
$ composer test
License
Licensed under MIT
统计信息
- 总下载量: 444
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-09-29