isNegative

@JvmName(name = "shortIsNegative")
fun Validatable<Short?>.isNegative(): Constraint
@JvmName(name = "intIsNegative")
fun Validatable<Int?>.isNegative(): Constraint
@JvmName(name = "longIsNegative")
fun Validatable<Long?>.isNegative(): Constraint
@JvmName(name = "floatIsNegative")
fun Validatable<Float?>.isNegative(): Constraint
@JvmName(name = "doubleIsNegative")
fun Validatable<Double?>.isNegative(): Constraint


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

Code example:

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