what I'm wanting to do is add a new validation method that will validate if 2 fields are not equal DEPENDING if a radio button is ticked (see here - http://jsfiddle.net/dazziep/uVnQ4/9/)
The code I have works, but I have had to fudge it a little by adding the field in the actual method where I would rather pass it through.
So at the moment I have ...
jQuery.validator.addMethod("test", function(value, element, param){
// check if dependency is met
if (!this.depend(param, element)) return "dependency-mismatch";
return value != $("#ImEqDepEq").val();
},
jQuery.format("Should not match Equality value.")
);`
I obviously just want ($("#ImEqDepEq").val()) to be another parameter that I pass in.
I hope this makes some kind of sense, I'm rubbish at explaining things :(
cheers
Daz