From 65388238c362b5b3c1338ad7fe4842f30271ebb2 Mon Sep 17 00:00:00 2001 From: hackerESQ Date: Tue, 28 Jan 2025 17:39:08 -0600 Subject: [PATCH] fix: allow carbon as date for qty validation --- app/Rules/QuantityValidationRule.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Rules/QuantityValidationRule.php b/app/Rules/QuantityValidationRule.php index 8dc3be9..103f97b 100644 --- a/app/Rules/QuantityValidationRule.php +++ b/app/Rules/QuantityValidationRule.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace App\Rules; use App\Models\Portfolio; +use Illuminate\Support\Carbon; use Illuminate\Contracts\Validation\ValidationRule; class QuantityValidationRule implements ValidationRule @@ -18,7 +19,7 @@ class QuantityValidationRule implements ValidationRule protected ?Portfolio $portfolio, protected ?string $symbol, protected ?string $transactionType, - protected ?string $date + protected string|Carbon|null $date ) { $this->portfolio = $portfolio; $this->symbol = $symbol;