📜  如何在请求中验证 laravel 中的数组 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:57.235000             🧑  作者: Mango

代码示例1
$validator = Validator::make($request->all(), [
    "names"    => "required|array|min:3",
    "names.*"  => "required|string|distinct|min:3",
]);