Implementation for allowing a maximum of 3 class selectors. Also prevents the use of element selectors.