fix: update prepareForValidation to use all input data for currency stripping
This commit is contained in:
parent
3e9776696d
commit
6546e1e3eb
@ -18,7 +18,7 @@ public function authorize(): bool
|
||||
#[Override]
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'amount'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'amount'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
@ -18,7 +18,7 @@ public function authorize(): bool
|
||||
#[Override]
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'amount'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'amount'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
@ -18,7 +18,7 @@ public function authorize(): bool
|
||||
#[Override]
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'amount'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'amount'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
@ -20,7 +20,7 @@ public function authorize(): bool
|
||||
#[Override]
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'amount'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'amount'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
@ -18,7 +18,7 @@ public function authorize(): bool
|
||||
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'variants.*.price', 'discount', 'shipping_cost'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'variants.*.price', 'discount', 'shipping_cost'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
@ -21,7 +21,7 @@ public function authorize(): bool
|
||||
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'discount', 'nego_price'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'discount', 'nego_price'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
@ -20,7 +20,7 @@ public function authorize(): bool
|
||||
#[Override]
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'shared_prices.*.price', 'variants.*.prices.*.price'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'shared_prices.*.price', 'variants.*.prices.*.price'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
@ -18,7 +18,7 @@ public function authorize(): bool
|
||||
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'prices.*.price'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'prices.*.price'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
@ -18,7 +18,7 @@ public function authorize(): bool
|
||||
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'variants.*.price'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'variants.*.price'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
@ -16,7 +16,7 @@ public function authorize(): bool
|
||||
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'price'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'price'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
@ -18,7 +18,7 @@ public function authorize(): bool
|
||||
#[Override]
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
$this->merge($this->stripCurrencyDot($this->validated(), 'late_penalty_amount', 'absent_penalty_amount'));
|
||||
$this->merge($this->stripCurrencyDot($this->all(), 'late_penalty_amount', 'absent_penalty_amount'));
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
|
||||
Loading…
Reference in New Issue
Block a user