Oba*_*ama 8 php validation laravel laravel-4
我正在与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
}
Run Code Online (Sandbox Code Playgroud)
除了多个输入外,我怎样才能返回输入,而不仅仅是密码?
我试过了,Input::except('password','avatar');但它不起作用.
任何帮助将不胜感激!