200, 'success' => false, 'errors' => $validator->errors() ]; $response = new Response(json_encode($data)); throw (new ValidationException($validator, $response)) ->errorBag($this->errorBag) ->redirectTo($this->getRedirectUrl()); } }