isNotEqualTo

The validatable value must be different from other when this constraint is applied.

Code example:

val validate = Validator<String> { isNotEqualTo("foo") }
validate("bar") // Success
validate("foo") // Failure (message: Must be different from "foo")

The validatable value must be different from other when this constraint is applied.

Code example:

val validate = Validator<Pair<String, String>> { first.isNotEqualTo(second) }
validate("foo" to "bar") // Success
validate("foo" to "foo") // Failure (message: Must be different from "foo")