diff options
| author | Sharad Chand | 2018-03-18 09:21:10 +0545 |
|---|---|---|
| committer | Sharad Chand | 2018-03-18 09:21:10 +0545 |
| commit | bcc9b005a4784d1c67a1622c93589377dae4d11c (patch) | |
| tree | 3387e0179ef1cc0d319c5109fbbd397f997f4ff6 | |
| parent | f01d70d1f9a21b84776b6f92df0bd6e6c356cd61 (diff) | |
| download | validator-bcc9b005a4784d1c67a1622c93589377dae4d11c.tar.bz2 | |
Added Option<Option<Vec<T>> field to test
| -rw-r--r-- | validator_derive/tests/complex.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/validator_derive/tests/complex.rs b/validator_derive/tests/complex.rs index 0a4c5f0..e7495b4 100644 --- a/validator_derive/tests/complex.rs +++ b/validator_derive/tests/complex.rs @@ -131,6 +131,8 @@ fn test_can_validate_option_fields_without_lifetime() { address: Option<Option<String>>, #[validate(length(min = "1", max = "10"))] ids: Option<Vec<usize>>, + #[validate(length(min = "1", max = "10"))] + opt_ids: Option<Option<Vec<usize>>>, #[validate(range(min = "1", max = "100"))] age: Option<Option<usize>>, #[validate(range(min = "1", max = "10"))] @@ -155,6 +157,7 @@ fn test_can_validate_option_fields_without_lifetime() { name: Some("al".to_string()), address: Some(Some("gol".to_string())), ids: Some(vec![1, 2, 3]), + opt_ids: Some(Some(vec![1, 2, 3])), age: Some(Some(20)), range: Some(2), email: Some("hi@gmail.com".to_string()), |
