dev-talha-anwar/laravel-validation-helper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

dev-talha-anwar/laravel-validation-helper

Composer 安装命令:

composer require dev-talha-anwar/laravel-validation-helper

包简介

This package is designed to use validation in laravel in very easy and efficient manner.

README 文档

README

GitHub issues GitHub forks GitHub stars GitHub license

simple validation utility for laravel validation

Installation

You can install the package via composer:

composer require dev-talha-anwar/laravel-validation-helper

Publishing Config

after installation publish the configurtion

php artisan vendor:publish --provider=TalhaAnwar\LaravelValidationHelper\LaravelValidationHelperServiceProvider

Usage

after installation simply use trait in your controller on top

use talhaanwar\LaravelValidationHelper\Traits\LVH;

after that use fascade

$validated = LVH::validate(['Admin.AdminEditForm'], [
            [
                'key' => 'name',
                'value' => ['max:191'],
                'messages' => [
                    'password.string' => 'Password Must Be String.',
                    'password.min' => 'Too long Password.'
                ]
            ]
        ]);
        if (!is_array($validated)) :
            return $validated;
        endif;

or

$validated = LVH::validate(['Admin.AdminEditForm']);
        if (!is_array($validated)) :
            return $validated;
        endif;

or

$validated = LVH::validate([], [
            [
                'key' => 'name',
                'value' => ['max:191'],
                'messages' => [
                    'password.string' => 'Password Must Be String.',
                    'password.min' => 'Too long Password.'
                ]
            ]
        ]);
        if (!is_array($validated)) :
            return $validated;
        endif;

for simple form validation requests

$validated = LVH::validate(['Admin.AdminEditForm'],[],true);
        if (!is_array($validated)) :
            return $validated;
        endif;

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email 786anwartalha@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

统计信息

  • 总下载量: 23
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固