isNotContaining

@JvmName(name = "arrayIsNotContaining")
fun <T> Validatable<Array<out T>?>.isNotContaining(element: T): Constraint

The validatable Array must not contain element when this constraint is applied.

Code example:

val validate = Validator<Array<Char>> { isNotContaining('b') }
validate(emptyArray()) // Success
validate(arrayOf('a', 'b', 'c')) // Failure (message: Must not contain "b")



@JvmName(name = "collectionIsNotContaining")
fun <T> Validatable<Collection<T>?>.isNotContaining(element: T): Constraint

The validatable Collection must not contain element when this constraint is applied.

Code example:

val validate = Validator<Collection<Char>> { isNotContaining('b') }
validate(emptyList()) // Success
validate(listOf('a', 'b', 'c')) // Failure (message: Must not contain "b")