avto-dev / extended-laravel-validator
Extended validation rules for Laravel applications
Installs: 40 049
Dependents: 2
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 7
Open Issues: 0
Requires
- php: ^8.1
- illuminate/config: ~10.0 || ~11.0
- illuminate/container: ~10.0 || ~11.0
- illuminate/contracts: ~10.0 || ~11.0
- illuminate/support: ~10.0 || ~11.0
- illuminate/validation: ~10.0 || ~11.0
Requires (Dev)
- laravel/laravel: ~10.0 || ~11.0
- mockery/mockery: ^1.6.5
- phpstan/phpstan: ^1.10.66
- phpunit/phpunit: ^10.5
README
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 "^3.0"
Installed
composer
is 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:
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-ce
+ docker-compose
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.