diff --git a/src/Model/Behavior/EnumBehavior.php b/src/Model/Behavior/EnumBehavior.php index f1d2bb5..76e8481 100644 --- a/src/Model/Behavior/EnumBehavior.php +++ b/src/Model/Behavior/EnumBehavior.php @@ -292,7 +292,7 @@ public function __call(string $method, array $args): bool throw new MissingEnumConfigurationException([$alias]); } - if (!$entity->has($config['field']) && Hash::get($config, 'allowEmpty') === true) { + if ($entity->isEmpty($config['field']) && Hash::get($config, 'allowEmpty') === true) { return true; }