minimum

fun DoubleRuleBuilder.minimum(limit: Double, message: () -> String)

Validates that the double value is greater than or equal to limit.

Usage:

rules<Double> {
minimum(3.0) { "must be greater than or equal to 3.0" }
}

Parameters

limit

The minimum value the double must have.

message

The message to return when the test fails.


fun FloatRuleBuilder.minimum(limit: Float, message: () -> String)

Validates that the float value is greater than or equal to limit.

Usage:

rules<Float> {
minimum(3.0f) { "must be greater than or equal to 3.0" }
}

Parameters

limit

The minimum value the float must have.

message

The message to return when the test fails.


fun IntRuleBuilder.minimum(limit: Int, message: () -> String)

Validates that the integer value is greater than or equal to limit.

Usage:

rules<Int> {
minimum(3) { "must be greater than or equal to 3" }
}

Parameters

limit

The minimum value the integer must have.

message

The message to return when the test fails.


fun LongRuleBuilder.minimum(limit: Long, message: () -> String)

Validates that the long value is greater than or equal to limit.

Usage:

rules<Long> {
minimum(3) { "must be greater than or equal to 3" }
}

Parameters

limit

The minimum value the long must have.

message

The message to return when the test fails.