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