aboutsummaryrefslogtreecommitdiffstats
path: root/validator_derive/tests
diff options
context:
space:
mode:
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(())
}