isNotContainingKey
The validatable Map must not contain the provided key when this constraint is applied.
Code example:
val validate = Validator<Map<Char, Int>> { isNotContainingKey('b') }
validate(emptyMap()) // Success
validate(mapOf('a' to 1, 'b' to 2, 'c' to 3)) // Failure (message: Must not contain key "b")
Content copied to clipboard