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 2y ago1 watchersCompare

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

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://www.gravatar.com/avatar/51aa3079a80f65bc1d0d9df668b10951285295feb619481a333b0d080499ba25?d=identicon)[xingzhilantian](/maintainers/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)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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