我正在与Laravel 4合作,
我正在使用验证器验证表单:
$validator = Validator :: make(Input :: all(),$rules);
失败时:
if ($validator->fails()) { return Redirect::to('register/test') ->withErrors($validator) ->withInput(Input::except('password')); // send back the input so that we can repopulate the form }
除了多个输入,我怎样才能返回输入,而不仅仅是密码?
我尝试过Input :: except(‘password’,’avatar’);但它不起作用.
任何帮助将不胜感激!
实际上,我发现我忘了把Input :: old(”)重新填充输入,
原文链接:https://www.f2er.com/laravel/137689.html所以解决方案是exaclty我尝试过Input :: except(‘password’,’avatar’);