code: function(state) {
        if(state == inputEx.stateRequired) {
           return this.options.messages.required;
        }
        else if(state == inputEx.stateInvalid) {
           return this.options.messages.invalid;
        }
        else {
           return '';
        }
  	}
docs: Get the string for the given state