From 268cec6d08edbb55e42febb0114763b563e76ed3 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 31 Dec 2023 18:00:55 +0100 Subject: [PATCH] Must be above zero. --- app/Api/V1/Requests/Models/Transaction/StoreRequest.php | 2 +- app/Api/V2/Request/Model/Transaction/StoreRequest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php index df6fd4ba4d..d6fe2c6bce 100644 --- a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php +++ b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php @@ -93,7 +93,7 @@ class StoreRequest extends FormRequest // amount 'transactions.*.amount' => 'required|numeric|gt:0|max:1000000000', - 'transactions.*.foreign_amount' => 'numeric|max:1000000000', + 'transactions.*.foreign_amount' => 'numeric|max:1000000000|gt:0|', // description 'transactions.*.description' => 'nullable|between:1,1000', diff --git a/app/Api/V2/Request/Model/Transaction/StoreRequest.php b/app/Api/V2/Request/Model/Transaction/StoreRequest.php index 72af551fb8..271f5fbd9d 100644 --- a/app/Api/V2/Request/Model/Transaction/StoreRequest.php +++ b/app/Api/V2/Request/Model/Transaction/StoreRequest.php @@ -107,8 +107,8 @@ class StoreRequest extends FormRequest 'transactions.*.foreign_currency_code' => 'min:3|max:51|exists:transaction_currencies,code|nullable', // amount - 'transactions.*.amount' => 'required|numeric|gt:0', - 'transactions.*.foreign_amount' => 'numeric', + 'transactions.*.amount' => 'required|numeric|gt:0|max:1000000000', + 'transactions.*.foreign_amount' => 'numeric|gt:0|max:1000000000', // description 'transactions.*.description' => 'nullable|between:1,1000',