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.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ikromjon1998/laravel-german-license-plate-validator
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