fix: allow carbon as date for qty validation
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||||||
namespace App\Rules;
|
namespace App\Rules;
|
||||||
|
|
||||||
use App\Models\Portfolio;
|
use App\Models\Portfolio;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
use Illuminate\Contracts\Validation\ValidationRule;
|
use Illuminate\Contracts\Validation\ValidationRule;
|
||||||
|
|
||||||
class QuantityValidationRule implements ValidationRule
|
class QuantityValidationRule implements ValidationRule
|
||||||
@@ -18,7 +19,7 @@ class QuantityValidationRule implements ValidationRule
|
|||||||
protected ?Portfolio $portfolio,
|
protected ?Portfolio $portfolio,
|
||||||
protected ?string $symbol,
|
protected ?string $symbol,
|
||||||
protected ?string $transactionType,
|
protected ?string $transactionType,
|
||||||
protected ?string $date
|
protected string|Carbon|null $date
|
||||||
) {
|
) {
|
||||||
$this->portfolio = $portfolio;
|
$this->portfolio = $portfolio;
|
||||||
$this->symbol = $symbol;
|
$this->symbol = $symbol;
|
||||||
|
|||||||
Reference in New Issue
Block a user