项目文件夹

文件
wehub-resource-sync 6cf6f95f58
CodeQL / Analyze (push) Has been cancelled
Sync to Gitee / Run (push) Has been cancelled
Go / build & test (1.25.x) (push) Has been cancelled
Go / build & test (1.26.x) (push) Has been cancelled
Lint / resolve module (push) Has been cancelled
Lint / lint module (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:39:43 +08:00
..

Validator Middleware for Kratos Project

This module provides a middleware for Kratos to validate request parameters, using schema defined in .proto files.

There used to be a middleware named Validator in Kratos, which calls the generated validation functions from PGV at runtime. Since PGV has been in maintenance, and recommend using protovalidate as an alternative.

That's why we provide a new middleware that uses the schema definitions and validation functions provided by protovalidate.

protovalidate no longer requires code generation at build time, but for compatibility with existing Kratos projects, we enable the legacy mode of protovalidate. For most users, no changes are needed to existing code. But for users who have manually implemented the Validator interface, you need to migrate the relevant implementation yourself.