garde
garde copied to clipboard
Time range rule
Checks if a field representing a time is after or before some point in time.
Should support Instant, and the time and chrono crates, maybe also humantime. Will need to investigate if support for both time and chrono is necessary.
#[derive(Validate)]
struct Test {
#[garde(time(before=..., after=...))]
date: Instant,
}
Looking at the weekly downloads for both chrono and time, might be worth implementing it for both?
Can we have this?