Skip to content

Commit

Permalink
[11.x] Made list validation rule as array for "size" rules in valid…
Browse files Browse the repository at this point in the history
…ation message (#52385)

Right now it's detected as "string" and it's not correct
  • Loading branch information
siarheipashkevich authored Aug 5, 2024
1 parent fd8e150 commit 4d7835b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Concerns/FormatsMessages.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ protected function getAttributeType($attribute)
// list doesn't have it we'll just consider it a string by elimination.
return match (true) {
$this->hasRule($attribute, $this->numericRules) => 'numeric',
$this->hasRule($attribute, ['Array']) => 'array',
$this->hasRule($attribute, ['Array', 'List']) => 'array',
$this->getValue($attribute) instanceof UploadedFile,
$this->getValue($attribute) instanceof File => 'file',
default => 'string',
Expand Down

0 comments on commit 4d7835b

Please sign in to comment.