isPositive

@JvmName(name = "shortIsPositive")
fun Validatable<Short?>.isPositive(): Constraint
@JvmName(name = "intIsPositive")
fun Validatable<Int?>.isPositive(): Constraint
@JvmName(name = "longIsPositive")
fun Validatable<Long?>.isPositive(): Constraint
@JvmName(name = "floatIsPositive")
fun Validatable<Float?>.isPositive(): Constraint
@JvmName(name = "doubleIsPositive")
fun Validatable<Double?>.isPositive(): Constraint


The validatable Duration must be positive when this constraint is applied.

Code example:

val validate = Validator<Duration> { isPositive() }
validate(1.seconds) // Success
validate(0.seconds) // Failure (message: Must be positive)
validate((-1).seconds) // Failure (message: Must be positive)
@JvmName(name = "durationIsPositive")
fun Validatable<Duration?>.isPositive(): Constraint
@JvmName(name = "periodIsPositive")
fun Validatable<Period?>.isPositive(): Constraint