diff --git a/src/Constraints/Enum.php b/src/Constraints/Enum.php
index <HASH>..<HASH> 100644
--- a/src/Constraints/Enum.php
+++ b/src/Constraints/Enum.php
@@ -17,8 +17,16 @@ class Enum implements Constraint
     {
         Assert::type($parameter, 'array', self::KEYWORD, $validator->getPointer());
 
-        if (in_array($value, $parameter, true)) {
-            return null;
+        if (is_object($value)) {
+            foreach ($parameter as $i) {
+                if (is_object($i) && $value == $i) {
+                    return null;
+                }
+            }
+        } else {
+            if (in_array($value, $parameter, true)) {
+                return null;
+            }
         }
 
         return new ValidationError(
Fixes enum constraint edge case with objects equality (#<I>)

* Fixes enum constraint edge case with objects equality



closes #<I>



* fix code style