We illustrate the connection between electron and neutrino scattering off nuclei and show how the former process can be used to constrain the description of the latter. After reviewing some of the nuclear models commonly used to study lepton-nucleus reactions, we describe in detail the SuSAv2 model and show how its predictions compare with the available electron- and neutrino-scattering data over the kinematical range going from the quasi-elastic peak to pion-production and highly inelastic scattering.