Skip to main content

Crate koruma_collection

Crate koruma_collection 

Source
Expand description

§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,
}

Modules§

collection
Collection validation validators.
format
Format validation validators.
general
General validation validators.
i18n
numeric
Numeric validation validators.
string
String validation validators.