Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time range rule #4

Open
jprochazk opened this issue Mar 26, 2023 · 2 comments
Open

Time range rule #4

jprochazk opened this issue Mar 26, 2023 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@jprochazk
Copy link
Owner

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 jprochazk added the enhancement New feature or request label Mar 26, 2023
@jprochazk jprochazk added this to the v1.0.0 milestone Mar 26, 2023
@Sammo98
Copy link

Sammo98 commented Aug 1, 2023

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

@Borderliner
Copy link

Can we have this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants