Download the PHP package olssonm/identity-number without Composer

On this page you can find all versions of the php package olssonm/identity-number. 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 identity-number

Swedish "personnummer" validator for Laravel

Latest Version on Packagist Build Status Scrutinizer Score


⚠️ Abandoned This package has been abandoned in favor of olssonm/swedish-entity.

While the package will be usable for the forseeable future, it will not be updated. Please migrate to olssonm/swedish-entity when possible.


Validator for Swedish "personnummer" (a.k.a. personal identity number, social security number or simply "PIN").

This validator also handles Swedish organization numbers and the temporary personal identity number known as "Samordningsnummer" (a.k.a. coordination number).

For use either as a standalone package, or with Laravel.

The package does not only apply the Luhn-algorithm for the last four digits, but also checks that the date of birth is a valid date.

Of course you can throw pretty much any format you wish at the validator, ie. 10-digit variant (7712112775) or the 12-digit variant (197712112775) and with or without a hyphen (771211-2775, 19771211-2775).

Install

Via Composer

Within Laravel

This package uses Package Auto-Discovery for loading the service provider. Once installed you should see the message

Else, per standard Laravel-procedure, just register the package in your providers array:

Usage

Standalone

The package is usable straight out of the box once installed with composer:

Personnummer ("personal identity number")

Organisationsnummer ("organization number")

Samordningsnummer ("coordination number")

The coordination-number validator handles the same way as the personal identity-validator but does not run a check/validation on the date of birth.

The IdentityNumberFormatter-class

The IdentityNumberFormatter-class allows you to format a PIN/identity for your custom needs. The class is also used internally for validation, but if you want to make sure you save the same value in the database as you pass for validation – you should also apply the formatting before validating.

Laravel validators

The package extends the Illuminate\Validator via a service provider, so all you have to do is use the identity_number-, coordination_number- and organization_number-rules, just as you would with any other rule.

And of course, you can roll your own error messages:

If you're using the validation throughout your application, you also might want to put the error message in your lang-files.

Testing

or

License

The MIT License (MIT). Please see License File for more information.

© 2020 Marcus Olsson.


All versions of identity-number with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
illuminate/support Version >=6.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 olssonm/identity-number contains the following files

Loading the files please wait ....