Laravel only validate items that are posted and ignore rest of validation array
For a project with Laravel 4.1 I have a little UI issue I'd like to solve. Some inputs make an ajax call to laravel on blur and that works fine. It simply sends it's value. In laravel I then check with the validator. public function validate() { if(Request::ajax()) { $validation = Validator::make(Input::all(), array( 'email' => 'unique:users|required|email', 'username' => 'required' )); if($validation->fails()) { return $validation->messages()->toJson(); } return ""; } return ""; } Although this works, the json string also contains fields I have no need to check. To be precise this is the