Skip to content

Commit 3a32200

Browse files
authored
Update ExtensionRule.php
Some devices create files with uppercase/mixed case extensions (.JPG seems to be a common one) - and, on windows the file extension is not visible by default so it's difficult for users to change.
1 parent 9577990 commit 3a32200

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Validation/Rules/ExtensionRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function isValid(): bool
5757
pathinfo($this->value, PATHINFO_EXTENSION)
5858
);
5959

60-
return ! empty($extension) && in_array($extension, $extensions);
60+
return ! empty($extension) && in_array(strtolower($extension), $extensions);
6161
}
6262

6363
return true;

0 commit comments

Comments
 (0)