adaptivemedia/laravel-pnr-validator
Validate Swedish Personal Identity Numbers
Installation
Install the package with Composer via the command line:
composer require adaptivemedia/laravel-pnr-validator
This package has auto discovery so you don't need to add the Service Provider.
Usage
Use it like any Validator rule:
$rules = [
'field' => 'pnr',
];
$rules = [
'field' => new PersonalIdentityNumber()
];
See the Validation documentation of Laravel.
Valid formats
- YYYYMMDD-XXXX
- YYMMDD-XXXX
- YYYYMMDDXXXX
- YYMMDDXXXX
- XXXXXX-XXXX (organization, TODO)
- XXXXXXXXXX (organization, TODO)
Related Packages
unicodeveloper/laravel-email-validator
Provides a Facade to help validate and verify email addresses
42,389
23
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.2.0 | >=7.4 | ^7| | MIT | |
| 1.1.0 | >=7.4 | ^7| | MIT | |
| 1.0.0 | >=7.4 | ^7 | MIT | |
| 0.3.3 | >=7.1 | ~5.0| | MIT | |
| 0.3.2 | >=7.1 | ~5.0| | MIT | |
| 0.3.1 | >=7.1 | ~5.0| | MIT | |
| 0.3.0 | >=5.4.0 | ~5.0 | MIT | |
| 0.2.1 | >=5.4.0 | ~5.0 | MIT | |
| v0.2 | >=5.4.0 | ~5.0 | MIT | |
| v0.1 | >=5.4.0 | ~5.0 | MIT |