Skip to main content

Crate ferrox_validation

Crate ferrox_validation 

Source
Expand description

§Ferrox Validation (ferrox-validation)

ferrox-validation provides the ValidatedJson<T> extractor for Axum, automating request payload validation using the validator crate before route handlers execute.

§Defensive Request Pipeline

In Ferrox’s onion architecture, requests containing invalid request bodies (e.g. malformed email addresses, out-of-range numbers) are short-circuited early with HTTP 400 Bad Request error responses before business logic is invoked.

§Key Features

  • 🛡️ ValidatedJson<T> Extractor: Automatic JSON payload deserialization and constraint validation.
  • ❌ Detailed Error Reporting: Returns structured JSON arrays detailing every field constraint failure.

Re-exports§

pub use extractor::ValidatedJson;

Modules§

extractor

Structs§

ValidationError
ValidationErrors

Traits§

Validate
This is the original trait that was implemented by deriving Validate. It will still be implemented for struct validations that don’t take custom arguments. The call is being forwarded to the ValidateArgs<'v_a> trait.

Functions§

setup

Derive Macros§

Validate