Skip to content

Commit

Permalink
Fix logic in StoreEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
JanOppolzer committed Aug 14, 2024
1 parent b1a582e commit 1ba73af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Requests/StoreEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function after(): array
function (Validator $validator) {
$data = $validator->safe();

if ($data['file'] && $data['metadata']) {
if (!empty($data['file']) && !empty($data['metadata'])) {
$validator->errors()->add('file', 'You cannot provide both a file and metadata. Please choose one.');
$validator->errors()->add('metadata', 'You cannot provide both a file and metadata. Please choose one.');
}
Expand Down

0 comments on commit 1ba73af

Please sign in to comment.