5
如何在Laravel中验证数组?
我尝试在Laravel中验证数组POST: $validator = Validator::make($request->all(), [ "name.*" => 'required|distinct|min:3', "amount.*" => 'required|integer|min:1', "description.*" => "required|string" ]); 我发送空的POST,并将其if ($validator->fails()) {}作为False。这意味着验证是正确的,但事实并非如此。 如何在Laravel中验证数组?当我提交表格时input name="name[]"
104
php
laravel
laravel-5.4