PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
← All changes | app/Http/Requests/TaxRateRequest.php +5 -7 1.3.19 → 1.6.5 View file →
@@ -1,11 +1,9 @@
1 1 <?php
2 2
3 3 namespace FluentCart\App\Http\Requests;
4 4
5 -use FluentCart\App\Models\TaxClass;
6 5 use FluentCart\Framework\Foundation\RequestGuard;
7 -use FluentCart\Framework\Support\Arr;
8 6
9 7 class TaxRateRequest extends RequestGuard
10 8 {
11 9
@@ -15,9 +13,9 @@
15 13 'country' => 'nullable|sanitizeText|maxLength:45',
16 14 'state' => 'nullable|sanitizeText|maxLength:45',
17 15 'postcode' => 'nullable|sanitizeText|maxLength:45',
18 16 'city' => 'nullable|sanitizeText|maxLength:45',
19 - 'rate' => 'nullable|sanitizeText|maxLength:45',
17 + 'rate' => 'nullable|numeric|min:0|max:99999',
20 18 'name' => 'nullable|sanitizeText|maxLength:45',
21 19 'group' => 'nullable|sanitizeText|maxLength:45',
22 20 'priority' => 'nullable|numeric|min:1',
23 21 'is_compound' => 'nullable|numeric|min:0',
@@ -22,9 +20,9 @@
22 20 'priority' => 'nullable|numeric|min:1',
23 21 'is_compound' => 'nullable|numeric|min:0',
24 22 'for_shipping' => 'nullable|numeric|min:0',
25 23 'for_order' => 'nullable|numeric|min:0',
26 - 'class_id' => 'required|min:0',
24 + 'class_id' => 'nullable|numeric|min:1',
27 25 ];
28 26 }
29 27
30 28 public function sanitize()
@@ -33,16 +31,16 @@
33 31 'country' => 'sanitize_text_field',
34 32 'state' => 'sanitize_text_field',
35 33 'postcode' => 'sanitize_text_field',
36 34 'city' => 'sanitize_text_field',
37 - 'rate' => 'sanitize_text_field',
35 + 'rate' => 'floatval',
38 36 'name' => 'sanitize_text_field',
39 37 'group' => 'sanitize_text_field',
40 38 'priority' => 'intval',
41 39 'is_compound' => 'intval',
42 - 'for_shipping' => 'intval',
40 + 'for_shipping' => 'floatval',
43 41 'for_order' => 'intval',
44 - 'class_id' => 'intval',
42 + 'class_id' => 'intval',
45 43 ];
46 44 }
47 45
48 46 }