code: function() {
  		var className;
  	   // remove previous class
  	   if( this.previousState ) {
  	      // remove invalid className for both required and invalid fields
  	      className = 'inputEx-'+((this.previousState == inputEx.stateRequired) ? inputEx.stateInvalid : this.previousState);
  		   Dom.removeClass(this.divEl, className);
  	   }
  	   
  	   // add new class
  	   var state = this.getState();
  	   if( !(state == inputEx.stateEmpty && Dom.hasClass(this.divEl, 'inputEx-focused') ) ) {
  	      // add invalid className for both required and invalid fields
  	      className = 'inputEx-'+((state == inputEx.stateRequired) ? inputEx.stateInvalid : state);
  	      Dom.addClass(this.divEl, className );
        }
  	
  	   if(this.options.showMsg) {
  	      this.displayMessage( this.getStateString(state) );
        }
  	   
  	   this.previousState = state;
  	}
docs: Set the styles for valid/invalide state