isLowerThan



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

Code example:

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