avto-dev/extended-laravel-validator
Extensions for Laravel Validator
This package provides extended validation rules for Laravel validator.
Install
Require this package with composer using the following command:
$ composer require avto-dev/extended-laravel-validator "^6.0"
Installed
composeris required (how to install composer).
You need to fix the major version of package.
After that you can "publish" configuration file (./config/extended-laravel-validator.php) using next command:
$ ./artisan vendor:publish --provider="AvtoDev\\ExtendedLaravelValidator\\ServiceProvider"
Usage
This package provides next validation rules:
| Rule | Description |
|---|---|
vin_code |
Vehicle VIN-code |
grz_code |
Vehicle GRZ-code |
sts_code |
Vehicle Registration Certificate Number (STS) |
pts_code |
Vehicle Passport Number (PTS) |
body_code |
Vehicle body number |
chassis_code |
Vehicle chassis number |
driver_license_number |
Driving license number |
cadastral_number |
Cadastral number (unique property number) |
epts_code |
Vehicle Electronic Passport Number (EPTS) |
Usage example:
<?php
/** @var \Illuminate\Contracts\Validation\Factory $validator */
$validator = resolve('validator');
$result = $validator->make([
'value' => 'XWB3L32EDCA218918',
], [
'value' => 'required|vin_code',
]);
$is_valid = $result->fails() === false;
Testing
For package testing we use phpunit framework and docker with compose plugin as develop environment. So, just write into your terminal after repository cloning:
$ make build
$ make latest # or 'make lowest'
$ make test
Changes log
Changes log can be found here.
Support
If you will find any package errors, please, make an issue in current repository.
License
This is open-sourced software licensed under the MIT License.
Related Packages
A library for validating a context (POST, GET etc...) by running given rules.
A phone validator for Laravel using the free Twilio phone lookup service.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v6.1.0 | ^8.2 | ~11.0 | | MIT | |
| v6.0.1 | ^8.2 | ~11.0 | | MIT | |
| v6.0.0 | ^8.1 | ~10.0 | | MIT | |
| v5.1.0 | ^8.2 | ~11.0 | | MIT | |
| v5.0.0 | ^8.1 | ~10.0 | | MIT | |
| v4.0.0 | ^8.1 | ~10.0 | | MIT | |
| v3.8.0 | ^8.1 | ~10.0 | | MIT | |
| v3.7.0 | ^8.0 | ~9.0 | | MIT | |
| v3.6.0 | ^7.3 | | ~6.0 | | MIT | |
| v3.5.0 | ^7.2 | | ~6.0 | | MIT | |
| v3.4.0 | ^7.2 | ~6.0 | | MIT | |
| v3.3.0 | ^7.1.3 | ^5.5 | | MIT | |
| v3.2.0 | ^7.1.3 | ^5.5 | | MIT | |
| v3.1.0 | ^7.1.3 | >=5.5.0 <5.9.0 | | MIT | |
| v3.0.0 | ^7.1.3 | >=5.5.0 <5.9.0 | MIT | |
| v2.2.0 | ^5.6 | | >=5.4.0 <5.8.0 | MIT | |
| v2.1.0 | ^5.6 | | >=5.4.0 <5.8.0 | MIT | |
| v2.0.0 | ^5.6 | | >=5.4.0 <5.7.0 | MIT | |
| v1.2.0 | ^5.6 | | >=5.4.0 <5.7.0 | MIT | |
| v1.1.2 | ^5.6 | | >=5.4.0 <5.7.0 | MIT | |
| v1.1.1 | ^5.6 | | >=5.4.0 <5.7.0 | MIT | |
| v1.1.0 | ^5.6 | | >=5.4.0 <5.7.0 | MIT | |
| v1.0.5 | ^5.6 | | >=5.4.0 <5.7.0 | MIT | |
| v1.0.4 | ^5.6 | | 5.4.* | | MIT | |
| v1.0.3 | ^5.6 | | 5.4.* | | MIT | |
| v1.0.2 | ^5.6 | | ~5.4 | MIT | |
| v1.0.1 | ^5.6 | | ~5.4 | MIT | |
| v1.0.0 | ^5.6 | | ~5.4 | MIT |