Skip to content

Commit 4d32bff

Browse files
committed
sigh.
1 parent 5b37205 commit 4d32bff

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

resources/js/form-requests/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export namespace App.Http.Requests {
44
*/
55
export interface TestRequest2 {
66
just_a_string: boolean;
7+
test: any[];
78
}
89

910
/**

src/Commands/GenerateFormRequestsCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ protected function parseRules(FormRequest $formRequest) {
8686
'rules' => $adjustedRules
8787
];
8888
})
89-
// Strip array value types (e.g., rule_array.*) because we don't support that yet
90-
->reject(fn($v, $k) => str_contains($k, '.*'))
89+
// Strip any keys that contain a dot
90+
->reject(fn($v, $k) => Str::contains($k, '.'))
9191
// Strip any rules that are closures or invokable objects
9292
->reject(fn($v) => collect($v['rules'])->contains(fn($rule) => is_object($rule)))
9393
->map(function ($item, $field) use ($mappings) {

workbench/app/Http/Requests/TestRequest2.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ public function rules(): array
1818
function (string $attr, mixed $value, Closure $fail) {
1919
// Intentionally left empty.
2020
},
21-
]
21+
],
22+
'test' => 'array',
23+
'test.with.dot' => 'string',
2224
];
2325
}
2426
}

0 commit comments

Comments
 (0)