axum-impl-validation
OfficialValidate JSON bodies with guaranteed 422s.
Software Engineering#axum#request validation#validator crate#422 unprocessable entity#custom extractor#serde Deserialize#regex LazyLock
AuthorImpertio-Studio
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Axum handlers can accept semantically invalid JSON because Json<T> only guarantees syntactic JSON and successful deserialization, not that the values satisfy your domain rules.
Core Features & Use Cases
- Type-level request validation: Use a custom
ValidatedJson<T>extractor so invalid payloads are rejected before the handler runs. - Correct status codes and error shapes: Preserve
JsonRejectionfor malformed JSON (400-class) while mapping validator failures to422 Unprocessable Entity. - Validator-driven rules: Apply
validatorcrate checks via#[derive(Validate)]and#[validate(...)]attributes, including email, length, ranges, must-match, nested structs, and static-regex validation.
Quick Start
Use axum-impl-validation to implement ValidatedJson<T> for your request structs, ensuring validation failures return 422 with structured ValidationErrors.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: axum-impl-validation Download link: https://github.com/Impertio-Studio/Axum-Claude-Skill-Package/archive/main.zip#axum-impl-validation Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.