質問編集履歴
4
細く
test
CHANGED
File without changes
|
test
CHANGED
@@ -109,3 +109,9 @@
|
|
109
109
|
|
110
110
|
|
111
111
|
よろしくお願い致します。
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
### 補足
|
116
|
+
|
117
|
+
between1,9 でバリデーション かけた時、12でも通ってしまっています。
|
3
あ
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,7 +40,17 @@
|
|
40
40
|
|
41
41
|
```php
|
42
42
|
|
43
|
+
public function rules()
|
44
|
+
|
45
|
+
{
|
46
|
+
|
47
|
+
return [
|
48
|
+
|
43
|
-
"quantity" => 'numeric | between:1,12 | required',
|
49
|
+
"quantity" => 'numeric | between:1,12 | required',
|
50
|
+
|
51
|
+
];
|
52
|
+
|
53
|
+
}
|
44
54
|
|
45
55
|
```
|
46
56
|
|
2
a
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,9 +36,9 @@
|
|
36
36
|
|
37
37
|
|
38
38
|
|
39
|
+
FormRequest
|
39
40
|
|
40
|
-
|
41
|
-
```
|
41
|
+
```php
|
42
42
|
|
43
43
|
"quantity" => 'numeric | between:1,12 | required',
|
44
44
|
|
@@ -46,7 +46,9 @@
|
|
46
46
|
|
47
47
|
|
48
48
|
|
49
|
-
|
49
|
+
Contoroller
|
50
|
+
|
51
|
+
```php
|
50
52
|
|
51
53
|
public function add(CartFormRequest $req){
|
52
54
|
|
@@ -60,7 +62,9 @@
|
|
60
62
|
|
61
63
|
|
62
64
|
|
63
|
-
|
65
|
+
blade
|
66
|
+
|
67
|
+
```php
|
64
68
|
|
65
69
|
<select name="quantity">
|
66
70
|
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
### 環境
|
6
6
|
|
7
|
-
- PHP 7
|
7
|
+
- PHP 7.2
|
8
8
|
|
9
9
|
- Laravel 5.3
|
10
10
|
|