From a03d18b4c46cfe4121fc24073109e76d137f77b7 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Tue, 9 Jun 2020 21:35:16 +0200 Subject: Slight tweak on a test --- validator_derive/tests/range.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/validator_derive/tests/range.rs b/validator_derive/tests/range.rs index 006d085..510b13f 100644 --- a/validator_derive/tests/range.rs +++ b/validator_derive/tests/range.rs @@ -89,4 +89,5 @@ fn can_pass_reference_as_validate() { let val = TestStruct { num_field: 10 }; validate(&val).unwrap_err(); + assert_eq!(val.num_field, 10); } -- cgit v1.2.3 From 709a78d1b6d749b8fb6bda98d3859e6502b449dc Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Tue, 9 Jun 2020 21:39:53 +0200 Subject: Update readme + deps --- README.md | 12 +++++++++++- validator/Cargo.toml | 2 +- validator_derive/Cargo.toml | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b55bebd..b74bc09 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,9 @@ struct SignupData { #[validate] contact_details: ContactDetails, #[validate] - preferences: Vec + preferences: Vec, + #[validate(required)] + allow_cookies: Option, } #[derive(Debug, Validate, Deserialize)] @@ -344,6 +346,11 @@ For example, the following attributes all work: ### validator +#### 0.10.1 (2020/06/09) + +- Add a blanket Validate implementation for references +- Add `Required` and `RequiredNested` validators + #### 0.10.0 (2019/10/18) - Add `non_control_characters` validation @@ -379,6 +386,9 @@ For example, the following attributes all work: ### validator_derive +#### 0.10.1 (2020/06/09) + +- Handle `Required` and `RequiredNested` validators #### 0.10.0 (2019/10/18) diff --git a/validator/Cargo.toml b/validator/Cargo.toml index b7e43c0..d8972f6 100644 --- a/validator/Cargo.toml +++ b/validator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "validator" -version = "0.10.0" +version = "0.10.1" authors = ["Vincent Prouillet