koruma
koruma is a per-field validation framework focused on:
- Type Safety: Strongly typed validation error structs generated at compile time.
- Ergonomics: Derive macros and validator attributes that minimize boilerplate.
- Developer Experience: Optional constructors, nested/newtype validation, and fluent/i18n.
koruma-collection
A curated set of validators built on top of koruma, organized by domain:
string, format, numeric, collection, and general-purpose validators.
Quick Start
use ;
let user = User ;
let err = user.validate.unwrap_err;
if let Some = err.age.range_validation
Fluent/i18n
Enable the fluent feature and derive EsFluent on validators for localized messages. Use
KorumaAllFluent to format all() results, and koruma-collection with full-fluent to get
built-in validators plus translations.