Added ability to change the class added for invalid state