1Set an "Accept": "application/json" Request Header
2 -- OR --
3force the default response behavior by sepcifying the response() method
4in your own CustomFormRequest class:
5// -- example -- //
6public function response(array $errors)
7{
8 // Always return JSON.
9 return response()->json($errors, 422);
10}