isNegativeOrZero

@JvmName(name = "shortIsNegativeOrZero")
fun Validatable<Short?>.isNegativeOrZero(): Constraint
@JvmName(name = "intIsNegativeOrZero")
fun Validatable<Int?>.isNegativeOrZero(): Constraint
@JvmName(name = "longIsNegativeOrZero")
fun Validatable<Long?>.isNegativeOrZero(): Constraint
@JvmName(name = "floatIsNegativeOrZero")
fun Validatable<Float?>.isNegativeOrZero(): Constraint
@JvmName(name = "doubleIsNegativeOrZero")
fun Validatable<Double?>.isNegativeOrZero(): Constraint


The validatable Duration must be negative or zero when this constraint is applied.

Code example:

val validate = Validator<Duration> { isNegativeOrZero() }
validate((-1).seconds) // Success
validate(0.seconds) // Success
validate(1.seconds) // Failure (message: Must be negative or equal to zero)
@JvmName(name = "durationIsNegativeOrZero")
fun Validatable<Duration?>.isNegativeOrZero(): Constraint
@JvmName(name = "periodIsNegativeOrZero")
fun Validatable<Period?>.isNegativeOrZero(): Constraint