isNotContaining
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")
Content copied to clipboard
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")
Content copied to clipboard