How to validate array in Laravel?
问题 I try to validate array POST in Laravel: $validator = Validator::make($request->all(), [ "name.*" => 'required|distinct|min:3', "amount.*" => 'required|integer|min:1', "description.*" => "required|string" ]); I send empty POST and get this if ($validator->fails()) {} as False . It means that validation is true, but it is not. How to validate array in Laravel? When I submit form with input name="name[]" 回答1: Asterisk symbol (*) means that you want to check VALUES in the array, not the actual