v0.14.1
What's Changed
#65 by @aumetra
You can now bind the context to a variable, and the length
and byte_length
rules min
and max
values may now contain arbitrary expressions. This means the following is now possible:
struct Config {
min_length: usize,
}
#[derive(garde::Validate)]
#[garde(context(Config as conf))]
struct Foo {
#[garde(length(
min = conf.min_length,
max = self.baz.len()
))]
bar: String,
#[garde(skip)]
baz: String,
}
New Contributors
Full Changelog: v0.14.0...v0.14.1