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 = "iterableIsNotContaining")
fun <T> Validatable<Iterable<T>?>.isNotContaining(element: T): Constraint

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

Code example:

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