fix quantity validation

This commit is contained in:
hackerESQ
2024-09-06 23:15:52 -05:00
parent 96a408b32d
commit a5c95e95ae
2 changed files with 20 additions and 6 deletions
@@ -40,7 +40,7 @@ new class extends Component {
'required',
'numeric',
'min:0',
new QuantityValidationRule($this->portfolio, $this->symbol, $this->transaction_type)
new QuantityValidationRule($this->portfolio, $this->symbol, $this->transaction_type, $this->date)
],
'cost_basis' => 'exclude_if:transaction_type,SELL|min:0|numeric',
'sale_price' => 'exclude_if:transaction_type,BUY|min:0|numeric',