Time Validators for Go
Use Time() for time.Time values. Time ordering uses After(),
AfterOrEqualTo(), Before(), and BeforeOrEqualTo().
v.Is(v.Time(start, "start").Before(end))v.Is(v.Time(end, "end").AfterOrEqualTo(start))v.Is(v.Time(now, "created_at").Between(start, end)) // inclusiveOther rules are EqualTo(), Zero(), InSlice(), and Passing().
Pointer variant
Section titled “Pointer variant”TimeP() accepts *time.Time and adds Nil() and NilOrZero().
var expiresAt *time.Timev.Is(v.TimeP(expiresAt, "expires_at").Nil())