aboutsummaryrefslogtreecommitdiffstats
path: root/validator_derive/tests
diff options
context:
space:
mode:
authorVincent Prouillet2018-03-19 12:34:57 +0100
committerGitHub2018-03-19 12:34:57 +0100
commitcd635464c3f3033ea64f53ac1f6cb38a7e8c41fd (patch)
tree3613384d280a666e096ba880e667b638083beba4 /validator_derive/tests
parent6ce2d3a5264fb337d9a8b5f365fc98387baafa8a (diff)
parent8ca1fe94d779dcccf4b3f4c23a08f3ede7e10956 (diff)
downloadvalidator-cd635464c3f3033ea64f53ac1f6cb38a7e8c41fd.tar.bz2
Merge pull request #45 from Eijebong/fix_path_in_derive
Fix path parsing for custom validators
Diffstat (limited to 'validator_derive/tests')
-rw-r--r--validator_derive/tests/run-pass/custom.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/validator_derive/tests/run-pass/custom.rs b/validator_derive/tests/run-pass/custom.rs
index 3a2a396..dff6375 100644
--- a/validator_derive/tests/run-pass/custom.rs
+++ b/validator_derive/tests/run-pass/custom.rs
@@ -10,6 +10,12 @@ struct Test {
s: String,
}
+#[derive(Validate)]
+struct TestPath {
+ #[validate(custom = "::validate_something")]
+ s: String,
+}
+
fn validate_something(s: &str) -> Result<(), ValidationError> {
Ok(())
}