annotated 0.4.0

Declarative validation for structs and enums, like data annotations, 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
error: `unit` is "chars", "bytes" or "graphemes"
 --> tests/ui/unknown_length_unit.rs:5:39
  |
5 |     #[validate(length(max = 3, unit = "words"))]
  |                                       ^^^^^^^

error: `unit` is "chars", "bytes" or "graphemes"
  --> tests/ui/unknown_length_unit.rs:11:39
   |
11 |     #[validate(length(max = 3, unit = bytes))]
   |                                       ^^^^^