diff options
| author | Vincent Prouillet | 2020-06-09 21:42:35 +0200 |
|---|---|---|
| committer | GitHub | 2020-06-09 21:42:35 +0200 |
| commit | de50cf78d2ce383d7c24fa283341c8e0a7a21de5 (patch) | |
| tree | 81f4e4652c7a74e5717d2057ccf0929d54e31d40 | |
| parent | ed5fab36d7f0cb8313dd13464f6f9bfe2bafcf05 (diff) | |
| parent | 709a78d1b6d749b8fb6bda98d3859e6502b449dc (diff) | |
| download | validator-master.tar.bz2 | |
Prepare for 0.10.1
| -rw-r--r-- | README.md | 12 | ||||
| -rw-r--r-- | validator/Cargo.toml | 2 | ||||
| -rw-r--r-- | validator_derive/Cargo.toml | 4 | ||||
| -rw-r--r-- | validator_derive/tests/range.rs | 1 |
4 files changed, 15 insertions, 4 deletions
@@ -109,7 +109,9 @@ struct SignupData { #[validate] contact_details: ContactDetails, #[validate] - preferences: Vec<Preference> + preferences: Vec<Preference>, + #[validate(required)] + allow_cookies: Option<bool>, } #[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 <prouillet.vincent@gmail.com"] license = "MIT" description = "Common validation functions (email, url, length, ...) and trait - to be used with `validator_derive`" diff --git a/validator_derive/Cargo.toml b/validator_derive/Cargo.toml index 4062170..c4e6d6e 100644 --- a/validator_derive/Cargo.toml +++ b/validator_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "validator_derive" -version = "0.10.0" +version = "0.10.1" authors = ["Vincent Prouillet <prouillet.vincent@gmail.com"] license = "MIT" description = "Macros 1.1 implementation of #[derive(Validate)]" @@ -30,6 +30,6 @@ lazy_static = "1" serde = "1.0" serde_derive = "1.0" serde_json = "1.0" -compiletest_rs = "0.3" +compiletest_rs = "0.5" 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); } |
