jQuery Validate problem
jQuery Validate problem
I can use condition to decide validate or not, for example
- rules: {
- money: {
- required: function() {
- return condition ? true : false;
- }
- }
- }
therefore, if condition is true, the filed should be input something, but I can't do the same thing to other methods
- rules: {
- money: {
- required: function() {
- return condition ? true : false;
- },
- digits: function() {
- return false;
- }
- }
- }
even I use return false, it's still check the field's format, how to enable and disable the check method as I want like required?