koruma-collection 0.4.0

A collection of common validators using koruma.
Documentation

koruma-collection

Docs Crates.io Crowdin

A curated set of validators built on top of koruma, organized by domain: string, format, numeric, collection, and general-purpose validators.

Features

  • full: enables all validators and optional dependencies.
  • fmt (default): enables Display implementations for validators.
  • fluent: enables fluent/i18n integration and embedded translations.
  • full-fluent: full + fluent.

Example

use koruma::Koruma;
use koruma_collection::string::ContainsValidation;

#[derive(Koruma)]
struct User {
    #[koruma(ContainsValidation::<_>(substring = "67"))]
    username: String,
}