vakata/validation 问题修复 & 功能扩展

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

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

vakata/validation

最新稳定版本:1.9.10

Composer 安装命令:

composer require vakata/validation

包简介

A validation class

README 文档

README

Latest Version on Packagist Software License Build Status Code Climate Tests Coverage

An extended implementation of the routing class, dealing with an HTTP abstraction and middleware.

Install

Via Composer

$ composer require vakata/validation

Usage

$v = new \vakata\validation\Validator();
$v
    ->required('name', 'requiredN')->alpha(null, "alphaN")->notEmpty("empty")
    ->required('family', 'requiredF')->alpha(null, "alphaF")
    ->required('age', 'requiredA')->numeric("numericA")
    ->optional("newsletter")->numeric("numericN")
    ->optional("children.*.name")->alpha(null, "alphaC")
    ->optional("children.*.age")->numeric(null, "numericC");
$errors = $v->run($_POST);
// inspect the array - if empty - the data is valid

Read more in the API docs

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email github@vakata.com instead of using the issue tracker.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-20