isGreaterThan



The validatable Duration must be greater than value when this constraint is applied.

Code example:

val validate = Validator<Duration> { isGreaterThan(Duration.ZERO) }
validate(1.seconds) // Success
validate(0.seconds) // Failure (message: Must be greater than 0s)
validate((-1).seconds) // Failure (message: Must be greater than 0s)