| @@ -1,8 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace FluentCart\App\Http\Requests; |
| 4 | 4 | |
| 5 | +use FluentCart\App\Helpers\CartHelper; | |
| 5 | 6 | use FluentCart\App\Helpers\Helper; |
| 6 | 7 | use FluentCart\Framework\Foundation\RequestGuard; |
| 7 | 8 | use FluentCart\Framework\Support\Arr; |
| 8 | 9 | |
| @@ -51,9 +52,9 @@ | ||
| 51 | 52 | "order_items.*.variation_id" => 'numeric|min:1', |
| 52 | 53 | "order_items.*.object_id" => 'numeric|min:1', |
| 53 | 54 | "order_items.*.fulfillment_type" => 'nullable|sanitizeText', |
| 54 | 55 | "order_items.*.payment_type" => 'nullable|sanitizeText|maxLength:100', |
| 55 | - "order_items.*.quantity" => 'numeric|min:1', | |
| 56 | + "order_items.*.quantity" => 'numeric|min:1|max:' . CartHelper::maxQuantity(), | |
| 56 | 57 | "order_items.*.post_title" => 'nullable|sanitizeText|maxLength:255', |
| 57 | 58 | "order_items.*.title" => 'nullable|sanitizeText|maxLength:255', |
| 58 | 59 | "order_items.*.price" => 'numeric', |
| 59 | 60 | "order_items.*.unit_price" => 'numeric', |
| @@ -188,9 +189,9 @@ | ||
| 188 | 189 | 'tax_total' => 'floatval', |
| 189 | 190 | 'tax_behavior' => 'intval', |
| 190 | 191 | 'total_amount' => 'floatval', |
| 191 | 192 | 'rate' => 'sanitize_text_field', |
| 192 | - 'note' => 'sanitize_text_field', | |
| 193 | + 'note' => 'sanitize_textarea_field', | |
| 193 | 194 | 'uuid' => 'sanitize_text_field', |
| 194 | 195 | 'ip_address' => 'sanitize_text_field', |
| 195 | 196 | 'billing_address_id' => 'intval', |
| 196 | 197 | 'shipping_address_id' => 'intval', |