ikromjon1998 / laravel-german-license-plate-validator
A Laravel package that provides a custom validation rule to verify the format of German license plate numbers, ensuring compliance with standard German license plate conventions.
v1.0.9
2025-01-07 08:39 UTC
Requires
- php: >=8.1
- illuminate/support: ^11.0
Requires (Dev)
- laravel/pint: ^1.19
- orchestra/testbench: ^8.0 || ^9.0
- phpunit/phpunit: ^10.5
README
A Laravel package to validate German license plate numbers.
Installation
Install via Composer:
composer require ikromjon1998/german-license-validator
Usage
Use the custom validation rule in your Laravel validators:
$request->validate([ 'license_plate' => 'required|german_license_plate', ]);
Configuration
You can publish the configuration file to customize the regex or error messages:
php artisan vendor:publish --tag=config
The configuration file will be published to config/license-plate.php
.
Testing
Run tests with PHPUnit:
vendor/bin/phpunit