jQuery validate creditcard2, how to only validate the credit card if the card is required?
In my validation rules, I have the following code:
	
    CardNumber:{
    		required:function(element){ return validateIfDeposit();},
    		creditcard2: function(){ return $('#CardType').val(); }
    	},

The required function works great (I use it successfully for the nameOnCard field). Unfortunately the CardNumber field is still coming back invalid. How can I have the credit card field be valid if the field is not required? 
jQuery validate creditcard2, how to only validate the credit card if the card is required?
===

In my validation rules, I have the following code:
	
    CardNumber:{
    		required:function(element){ return validateIfDeposit();},
    		creditcard2: function(){ return $('#CardType').val(); }
    	},

The required function works great (I use it successfully for the nameOnCard field). Unfortunately the CardNumber field is still coming back invalid. How can I have the credit card field be valid if the field is not required? 