garde icon indicating copy to clipboard operation
garde copied to clipboard

Time range rule

Open jprochazk opened this issue 2 years ago • 2 comments

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,
}

jprochazk avatar Mar 26 '23 11:03 jprochazk

Looking at the weekly downloads for both chrono and time, might be worth implementing it for both?

Sammo98 avatar Aug 01 '23 07:08 Sammo98

Can we have this?

Borderliner avatar Sep 01 '24 11:09 Borderliner