From 6b2de05ce6a60ada38f1dfe1fa74706b652fc896 Mon Sep 17 00:00:00 2001 From: Perry van der Meer <11609290+PerryvanderMeer@users.noreply.github.com> Date: Wed, 20 Mar 2024 21:16:38 +0100 Subject: [PATCH] [11.x] Allow `BackedEnum` and `UnitEnum` in `Rule::in` and `Rule::notIn` (#50680) * add backedenum and unitenum * Update In.php * Update NotIn.php --------- Co-authored-by: Taylor Otwell --- src/Illuminate/Validation/Rules/In.php | 2 +- src/Illuminate/Validation/Rules/NotIn.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Validation/Rules/In.php b/src/Illuminate/Validation/Rules/In.php index 9d33842b8071..d268575f7b9a 100644 --- a/src/Illuminate/Validation/Rules/In.php +++ b/src/Illuminate/Validation/Rules/In.php @@ -26,7 +26,7 @@ class In implements Stringable /** * Create a new in rule instance. * - * @param \Illuminate\Contracts\Support\Arrayable|array|string $values + * @param \Illuminate\Contracts\Support\Arrayable|\BackedEnum|\UnitEnum|array|string $values * @return void */ public function __construct($values) diff --git a/src/Illuminate/Validation/Rules/NotIn.php b/src/Illuminate/Validation/Rules/NotIn.php index e6b392c60b1b..1f1ba74b37b6 100644 --- a/src/Illuminate/Validation/Rules/NotIn.php +++ b/src/Illuminate/Validation/Rules/NotIn.php @@ -26,7 +26,7 @@ class NotIn implements Stringable /** * Create a new "not in" rule instance. * - * @param \Illuminate\Contracts\Support\Arrayable|array|string $values + * @param \Illuminate\Contracts\Support\Arrayable|\BackedEnum|\UnitEnum|array|string $values * @return void */ public function __construct($values)