Softening material models are known to trigger spurious localizations.This may be shown theoretically by the existence of solutions with zero dissipation when localization occurs and numerically with spurious mesh dependency and localization in a single layer of elements. We introduce in this paper a new way to avoid spurious localization. The idea is to enforce a Lipschitz regularity on the internal variables responsible for the material softening. The regularity constraint introduces the needed length scale in the material formulation. Moreover, we prove bounds on the domain affected by this constraint. A first one-dimensional finite element implementation is proposed for softening elasticity and softening plasticity.