hasSizeGreaterThan

@JvmName(name = "arrayHasSizeGreaterThan")
fun <T> Validatable<Array<out T>?>.hasSizeGreaterThan(size: Int): Constraint

The validatable Array must have a size greater than size when this constraint is applied.

Code example:

val validate = Validator<Array<Char>> { hasSizeGreaterThan(2) }
validate(arrayOf('a', 'b', 'c')) // Success
validate(arrayOf('a', 'b')) // Failure (message: The number of items must be greater than 2)

@JvmName(name = "collectionHasSizeGreaterThan")
fun <T> Validatable<Collection<T>?>.hasSizeGreaterThan(size: Int): Constraint

The validatable Collection must have a size greater than size when this constraint is applied.

Code example:

val validate = Validator<Collection<Char>> { hasSizeGreaterThan(2) }
validate(listOf('a', 'b', 'c')) // Success
validate(listOf('a', 'b')) // Failure (message: The number of items must be greater than 2)

@JvmName(name = "mapHasSizeGreaterThan")
fun <T> Validatable<Map<*, T>?>.hasSizeGreaterThan(size: Int): Constraint

The validatable Map must have a size greater than size when this constraint is applied.

Code example:

val validate = Validator<Map<Char, Int>> { hasSizeGreaterThan(2) }
validate(mapOf('a' to 1, 'b' to 2, 'c' to 3)) // Success
validate(mapOf('a' to 1, 'b' to 2)) // Failure (message: The number of items must be greater than 2)