Download the PHP package x-laravel/validation-tr-citizen-number-extend without Composer

On this page you can find all versions of the php package x-laravel/validation-tr-citizen-number-extend. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package validation-tr-citizen-number-extend

Turkish Citizen Number Validation for Laravel

Tests Latest Stable Version PHP Version Total Downloads License

A Laravel validation rule for Turkish citizen numbers (T.C. Kimlik No). It wraps x-adam/tr-citizen-number-validation, which checks the number offline against the official checksum rules — no network access, no dependencies beyond Laravel itself.

Requirements

Package version PHP Laravel
2.x 8.2+ 12, 13
1.x 7.0+ 5.5+

Installation

The service provider is registered through package discovery.

Usage

Rule object

The rule object comes with Turkish and English error messages and picks the one matching the application locale.

String alias

For the string alias Laravel resolves the error message the way it does for any extended rule, so add a line to your application's lang/xx/validation.php:

Without it Laravel falls back to the raw key validation.tr_citizen_number. You can also pass an inline message through the validator's messages argument or a form request's messages() method.

Either form accepts int and string values; anything else — arrays, booleans, floats — fails validation instead of throwing.

Customising the messages

To change the rule object's messages, publish the language files and edit them:

They land in lang/vendor/tr-citizen-number/{tr,en}/validation.php.

What it checks

The rule answers "is this a well-formed citizen number?" — length, leading digit and both check digits. It does not verify that the number belongs to a particular person; that requires the KPS service of the Turkish Directorate of Population and Citizenship Affairs, which is only available to institutions with a membership.

Testing

The suite runs on Orchestra Testbench against every supported Laravel and PHP combination in CI, along with PHPStan (Larastan) at its highest level.

License

Open source software licensed under the MIT license.


All versions of validation-tr-citizen-number-extend with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
illuminate/validation Version ^12.0 || ^13.0
x-adam/tr-citizen-number-validation Version ^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package x-laravel/validation-tr-citizen-number-extend contains the following files

Loading the files please wait ...