Ionic bonds are most likely to occur when the number of valence electrons is close to what numbers?

Ionic bonds are most likely to occur when the number of valence electrons is close to 8 or 0.