diff --git a/serde_valid/README.md b/serde_valid/README.md index dc1a51e..d4aa239 100644 --- a/serde_valid/README.md +++ b/serde_valid/README.md @@ -211,8 +211,8 @@ fn sample_validation(val1: i32, val2: &str) -> Result<(), serde_valid::validatio } #[derive(Validate)] +#[validate(custom(|s| sample_validation(s.val1, &s.val2)))] struct SampleStruct { - #[validate(custom(|s| sample_validation(s.val1, &s.val2)))] val1: i32, val2: String, }