The electronic configuration of Chlorine is 1s2 2s2 2p6 3s2 3p5.
There are three energy levels in chlorine
First energy level is n=1 has 1s2 so total 2 electrons
Second energy level is n=2, 2s2 2p6 so total 2+6= 8 electrons
Third has 3s2 3p5 electrons just 7 total... p can contain 6 electrons but only 5 are present. So the third level has lesser number of electrons than that can be filled