https://github.com/lightools/company-id-validator
Simple validation of Czech company ID.
https://github.com/lightools/company-id-validator
czech-company
Last synced: 5 months ago
JSON representation
Simple validation of Czech company ID.
- Host: GitHub
- URL: https://github.com/lightools/company-id-validator
- Owner: lightools
- License: other
- Created: 2016-03-30T09:08:48.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-23T14:55:58.000Z (about 10 years ago)
- Last Synced: 2025-07-13T07:25:39.177Z (11 months ago)
- Topics: czech-company
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Introduction
Simple validation of Czech company ID (IČ).
## Installation
```sh
$ composer require lightools/company-id-validator
```
## Simple usage
```php
$validator = new Lightools\CompanyIdValidator\CompanyIdValidator();
$validator->isValidId('27082440'); // true
$validator->isValidId('25596641'); // true
$validator->isValidId('1859951'); // true (leading zero added, you can disable this function in constructor)
$validator->isValidId('12345678'); // false
```
## Further validation
If you want to know if subject with some ID really exists, you can use [lightools/ares](https://github.com/lightools/ares).
## How to run tests
```sh
$ vendor/bin/tester tests
```