laravel用requests如何验证数组

在laravel中需要判断输入必须为数组

如何处理

```
'books' => 'required|array', # 验证 books[]
'books.author' => 'required|max:10', # 验证 books[author]
'books.*.author' => 'required|max:10', # 验证 books[test][author]
```

    A+
发布日期:2022年10月08日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: