PHPackages                             xingzhilantian/validate - 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. xingzhilantian/validate

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

xingzhilantian/validate
=======================

01PHP

Since Jun 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xingzhilantian/validate)[ Packagist](https://packagist.org/packages/xingzhilantian/validate)[ RSS](/packages/xingzhilantian-validate/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

validate
========

[](#validate)

基于酷喵喵的Validate更改修复bug后项目自用，如有侵权请联系删除

快速引入

composer require xingzhilantian/validate hyperf验证器 移植于ThinkPHP验证器

普通使用方法和tp一样

同时本组件也支持hyperf的注解

@Validate()

参数

validate 验证器 例：validate=AdminValidate::class

scene 场景

batch 是否批量验证 默认false

throws 是否主动抛出错误 默认true,当值为false不会主动抛出错误，可通过获取$this-&gt;request-&gt;getAttribute('validate')的值来手动抛出错误，该值为null时表示通过验证

filter 是否过滤多余字段 默认true 只获取验证的字段 通过$this-&gt;request-&gt;getParsedBody()获取

例: 发布验证器语言文件

@validate(validate=AdminValidate::class,scene="login",throws=false) 2020/11/26 新增对hyperf国际化组件支持 发布验证器语言文件

php bin/hyperf.php vendor:publish xingzhilantian/validate 默认发布后语言包地址

/storage /languages /en validation.php /zh\_CN validation.php

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43944437?v=4)[XingZai](/maintainers/xingzhilantian)[@xingzhilantian](https://github.com/xingzhilantian)

---

Top Contributors

[![xingzhilantian](https://avatars.githubusercontent.com/u/43944437?v=4)](https://github.com/xingzhilantian "xingzhilantian (9 commits)")

### Embed Badge

![Health badge](/badges/xingzhilantian-validate/health.svg)

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

PHPackages © 2026

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