isIdenticalTo

The validatable value must be identical to other when this constraint is applied.

The values are considered identical if they are referentially equal.

Code example:

data object Foo
data object Bar

val validate = Validator<Any> { isIdenticalTo(Foo) }
validate(Foo) // Success
validate(Bar) // Failure (message: Must be identical to "Foo")