Skip to content

Comparable

Comparable validators let you validate any ordered comparable types supported by Valgo.

type Score int
v.Is(v.Comparable(Score(10), "score").GreaterThan(Score(0)))

Pointer variant:

var s *Score
v.Is(v.ComparableP(s, "score").Nil())