From 1ba73af8a51b88e2b0ce6a0f71b0087faa690cb1 Mon Sep 17 00:00:00 2001 From: Jan Oppolzer Date: Wed, 14 Aug 2024 13:32:58 +0200 Subject: [PATCH] Fix logic in StoreEntity --- app/Http/Requests/StoreEntity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/StoreEntity.php b/app/Http/Requests/StoreEntity.php index 77ced96..a479f35 100644 --- a/app/Http/Requests/StoreEntity.php +++ b/app/Http/Requests/StoreEntity.php @@ -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.'); }