-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix file uploader, test typed attributes #20167
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20167 +/- ##
============================================
- Coverage 22.16% 13.51% -8.66%
+ Complexity 11386 11380 -6
============================================
Files 430 430
Lines 37113 37082 -31
============================================
- Hits 8225 5010 -3215
- Misses 28888 32072 +3184 ☔ View full report in Codecov by Sentry. |
Would you please add a line for CHANGELOG? |
👍 |
} else { | ||
$result = $this->validateValue($model->$attribute); | ||
foreach ($files as $file) { | ||
$result = $this->validateValue($file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validator does not modify the attribute anymore - it was filtering out non-uploaded-files values from the array so far, but only for the array typed attributes with maxFiles != 1 or minFiles > 1.
Setting max files != 1 and sending empty array does not ends in error.