PHPackages                             xuchen/form-validation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. xuchen/form-validation

ActivePhp[Validation &amp; Sanitization](/categories/validation)

xuchen/form-validation
======================

form validation

1.0.0(8y ago)4288Apache-2.0PHP

Since Jul 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/BarnettZhou/FormValidation)[ Packagist](https://packagist.org/packages/xuchen/form-validation)[ RSS](/packages/xuchen-form-validation/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

FormValidation
==============

[](#formvalidation)

为Lumen准备的一个表单验证插件

Require
-------

[](#require)

```
{
    "require": {
        "php": ">=5.6.0",
        "ext-mbstring": "*"
    }
}
```

Installation
------------

[](#installation)

项目目录中运行如下命令

```
composer require xuchen/form-validation:dev-master

```

或在项目目录composer.json的require中加入

```
"require": {
    "xuchen/form-validation": "dev-master"
}

```

并运行

```
composer update

```

Usage
-----

[](#usage)

在Lumen项目的`app`目录下新建`MyValidation.php`文件（你也可以放在Validations目录中，注意命名空间的对应）

```
