定制 avto-dev/extended-laravel-validator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

avto-dev/extended-laravel-validator

最新稳定版本:v5.0.0

Composer 安装命令:

composer require avto-dev/extended-laravel-validator

包简介

Extended validation rules for Laravel applications

README 文档

README

Laravel

Extensions for Laravel Validator

Version PHP Version Build Status Coverage Downloads count License

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:

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)

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

Release date Commits since latest release

Changes log can be found here.

Support

Issues Issues

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.

统计信息

  • 总下载量: 44.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-27