diff --git a/src/Enum.php b/src/Enum.php index 24f8c02..9c68252 100644 --- a/src/Enum.php +++ b/src/Enum.php @@ -24,11 +24,11 @@ public function attachEnum($class) ->rules('required', new EnumValue($class, false)) ->resolveUsing( function ($enum) { - return $enum->value; + return $enum ? $enum->value : null; }) ->displayUsing( function ($enum) { - return $enum->description; + return $enum ? $enum->description : null; }); }