Browse Source

Fix "Undefined array key" errors

ADmad 1 year ago
parent
commit
581f7dfd42
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/Validation/Validation.php

+ 2 - 0
src/Validation/Validation.php

@@ -919,6 +919,8 @@ class Validation
      */
     protected static function isValidEnum(BackedEnum $enum, array $options): bool
     {
+        $options += ['only' => null, 'except' => null];
+
         if ($options['only']) {
             if (!is_array($options['only'])) {
                 $options['only'] = [$options['only']];