annotated 0.1.0

Validation for structs that works with serde: every broken rule and missing field in one error
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use annotated::Validate;

#[derive(Validate)]
struct Tag {
    #[validate(length(max = 3, unit = "words"))]
    label: String,
}

#[derive(Validate)]
struct Note {
    #[validate(length(max = 3, unit = bytes))]
    text: String,
}

fn main() {}