public function redirectBackWithErrors($validator)
    {
        if (request()->wantsJson()) {
            return $this->validUnprocessableEntityJsonResponse($validator->errors());
        }

        return back()->withErrors($validator)->withInput();
    }