The effects of an external electric field on the formation of Liesegang patterns are investigated. The patterns are assumed to emerge from a phase separation process in the wake of a diffusive reaction front. The dynamics is described by a Cahn-Hilliard equation with a moving source term representing the reaction zone, and the electric field enters through its effects on the properties of the reaction zone. We employ our previous results [I. Bena, F. Coppex, M. Droz, and Z. Rácz, J. Chem. Phys. 122, 024512 (2005)] on how the electric field changes both the motion of the front, as well as the amount of reaction product left behind the front, and our main conclusion is that the number of precipitation bands becomes finite in a finite electric field. The reason for the finiteness in case when the electric field drives the reagents towards the reaction zone is that the width of consecutive bands increases so that, beyond a distance l(+), the precipitation is continuous (plug is formed). In case of an electric field of opposite polarity, the bands emerge in a finite interval l(-), since the reaction product decreases with time and the conditions for phase separation cease to exist. We give estimates of l(+/-) in terms of measurable quantities and thus present an experimentally verifiable prediction of the "Cahn-Hilliard equation with a moving source" description of Liesegang phenomena.