fish/one-validator 问题修复 & 功能扩展

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

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

fish/one-validator

Composer 安装命令:

composer require fish/one-validator

包简介

Convert server-side to client-side validation

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

Server->Client Validation Converter

While client-side validation is a standard nowadays, setting it is tedious and anti-DRYful. This Laravel 4+ package will convert your server-side rules to the popular JQuery validate plugin format, while adding all of the necessary assets to support the Laravel set of rules (including remote rules) and messages (including custom attributes and localization). File and date rules are not supported and will be ignored.

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require fish/one-validator.

"require-dev": {
	"fish/one-validator": "dev-master"
}

Next, update Composer from the Terminal:

composer update

Once this operation completes, the final step is to add the service provider. Open app/config/app.php, and add a new item to the providers array.

Fish\OneValidator\OneValidatorServiceProvider

Next, publish the assets to your project:

php artisan validator:init

The file that handles the validation methods and messages will be placed under public/one-validator.min.js. Be sure to include the script in your page.

That's it! You're all set to go.

Usage

The syntax is:

php artisan validator:convert path/to/file [--target=validation.js]

The first argument is the path to a PHP file with a valid $rules array, relative to the app folder.

By default the output will be echoed to the console. You can send the output to a file instead by using the target option, providing a path relative to the app folder.

Remember to replace the default .my-form selector with your own form selector.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固