Expand description
Substring validation.
#[derive(garde::Validate)]
struct Test {
#[garde(contains("test"))]
v: String,
}The entrypoint is the Contains trait. Implementing this trait for a type allows that type to be used with the #[garde(contains)] rule.
This trait has a blanket implementation for all T: AsRef<str>.