RustAPI Validate
Declarative, type-safe request validation.
This crate integrates the validator library deeply into the RustAPI extractor system.
The Problem
Manually checking if email.contains("@") in every handler is tedious and error-prone.
The Solution
Define rules on your structs. RustAPI automatically runs them and returns 422 Unprocessable Entity if constraints are violated.
Usage
use *;
// If execution enters this function, `body` is GUARANTEED to be valid.
async
Supported Validators
emailurllengthrangecustom(use your own functions)containsregex