将return back()-withErrors($validator-errors())-withInput();替换为下面的代码 $validator = \Validator::make($request-input(), $rules, $messages); if ($validator-fails()) { //将返回错误循环组装成字符串 $arr = []; foreach ($validator-getMessa
将return back()->withErrors($validator->errors())->withInput();替换为下面的代码
然后直接在ajax输出相应的错误就行了
|
2019-06-28
2019-10-03
2019-07-04
2019-06-22
2019-02-12