File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33[ ![ PHP Version] ( https://img.shields.io/badge/php-%3E%3D8.1-8892BF.svg )] ( https://php.net )
44[ ![ Hyperf Version] ( https://img.shields.io/badge/hyperf-%3E%3D3.1-brightgreen.svg )] ( https://hyperf.io )
55[ ![ License] ( https://img.shields.io/badge/license-Apache--2.0-blue.svg )] ( LICENSE )
6+ [ ![ CI] ( https://img.shields.io/badge/CI-GitHub%20Actions-blue )] ( https://github.com/hyperf-plus/validate/actions )
67
78基于 ` hyperf/validation ` 的请求验证组件,支持注解式验证和 FormRequest 验证器。
9+ 内置中文错误提示兜底、本地无语言包也能返回中文;默认安全过滤多余字段,可选安全模式拒绝未定义字段。
810
911## ✨ 4.0 新特性
1012
11- - 🚀 ** Hyperf 原生验证** - 完全基于 hyperf/validation,兼容所有 Laravel 验证规则
12- - 📝 ** 双模式支持** - 内联规则 + FormRequest 验证器
13- - ⚡ ** 极致性能** - 多层缓存,配置/类检查/字段列表全缓存
14- - 🎯 ** 精简设计** - 移除冗余功能,代码量减少 40%
15- - 🔧 ** Query/Body 分离** - 清晰区分 URL 参数和请求体验证
13+ - 🚀 ** Hyperf 原生验证** :完全基于 hyperf/validation,兼容所有 Laravel 规则
14+ - 📝 ** 双模式** :内联规则 + FormRequest 验证器,支持场景
15+ - ⚡ ** 性能优化** :多层缓存(配置/类检查/字段列表),更快
16+ - 🛡️ ** 安全稳定** :可选安全模式拦截未定义字段,内置中文错误兜底,无语言包仍返回中文
17+ - 🔧 ** Query/Body 分离** :清晰区分 URL 参数与请求体校验
18+ - ✅ ** CI 覆盖** :GitHub Actions 多 PHP 版本自动化测试
1619
1720> ⚠️ ** 破坏性变更** : 4.0 版本移除了 ThinkPHP 风格的 ` Validate ` 基类,仅支持 Hyperf 原生 ` FormRequest ` 。
1821
You can’t perform that action at this time.
0 commit comments