PHPackages                             yd/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. yd/validation

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

yd/validation
=============

YunDun php validation

v1.0.3(5y ago)012MITPHPPHP &gt;=5.6.0

Since Jan 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/yundun-php/validation)[ Packagist](https://packagist.org/packages/yd/validation)[ Docs](http://www.yundun.com)[ RSS](/packages/yd-validation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

对数据验证
=====

[](#对数据验证)

#### 使用

[](#使用)

```
$rule = [
	'age'=>['type'=>'int','default'=>0,'vstr'=>'num|>:0'],
	'account'=>['type'=>'str','default'=>'','vstr'=>'must|strIn:word','name'=>'账号必填|账号必须为字母'],
	'email'=>['type'=>'str','default'=>'','vstr'=>'strIs:email'],
	'qq'=>['type'=>'str','default'=>'','vstr'=>'strIs:qq'],
	'ip'=>['type'=>'str','default'=>'','vstr'=>'strIs:ip'],//
	'ip_range'=>['type'=>'str','default'=>'','vstr'=>'strIs:ip_range'],//ip段
	'params'=>[
	    'type'=>'list',
	    'default'=>[],
	    'vstr'=>'count_gt:0',
	    'name'=>'数组必须大于0',
	    'child'=>[
	        'id'=>['type'=>'int','default'=>0,'vstr'=>'must|num|>:0'],
	    ],
	],
];
$params = [
	'age'=>1,
	'account'=>'fdsafsdf',
	'email'=>'afsafdsaf@qq.com',
	'qq'=>'43546456',
	'ip'=>'10.10.1.1',
	'ip_range'=>'1.1.1.1-3.3.3.3',//支持 1.1.1.1-3.3.3.3 or 1.1.1.1/25
	'params'=>['id'=>0],
];
$data = Valid::make($rule,$params);
var_export($data);

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

3

Last Release

1942d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/de0ce6f05ce8265ba94672f1b08375b6bb1bdf5c4c92ce0cb1c57fa9c910e58a?d=identicon)[yundun](/maintainers/yundun)

---

Top Contributors

[![yundun-php](https://avatars.githubusercontent.com/u/58932741?v=4)](https://github.com/yundun-php "yundun-php (1 commits)")

---

Tags

phpvalidationvalidatevalid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yd-validation/health.svg)

```
[![Health](https://phpackages.com/badges/yd-validation/health.svg)](https://phpackages.com/packages/yd-validation)
```

###  Alternatives

[vlucas/valitron

Simple, elegant, stand-alone validation library with NO dependencies

1.6k4.4M128](/packages/vlucas-valitron)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
