Expand description

A data structure validation library

use validatron::Validate;

#[derive(Debug, Validate)]
struct MyStruct {
    #[validatron(min = 42)]
    a: i64,
    #[validatron(max_len = 5)]
    b: Vec<u32>,

let x = MyStruct {
    a: 36,
    b: vec![]



pub use error::Error;
pub use error::Location;


An Error type for representing validation failures
pre-rolled validators for data structures


The core Validatron trait, types that implement this trait can be exhaustively validated.

Type Definitions

A convenience type for Results using the Error error type.

Derive Macros

A derive macro for validating data structures