Skip to content

Commit

Permalink
[11.x] Allow BackedEnum and UnitEnum in Rule::in and `Rule::not…
Browse files Browse the repository at this point in the history
…In` (#50680)

* add backedenum and unitenum

* Update In.php

* Update NotIn.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
PerryvanderMeer and taylorotwell authored Mar 20, 2024
1 parent 0426df2 commit 6b2de05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Rules/In.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Rules/NotIn.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6b2de05

Please sign in to comment.