[jQuery] custom error message

2009-11-18 Thread Ryan Elfman
How do I return a custom message based on an if statement in the addMethod function? $.validator.addMethod("validateBaseDepth", function(value, element, params) { var blnImperialUnits = ($ ("#RequireBaseDepthUnitImperial:checked").val() == "imperial" ? true : false);

[jQuery] Custom error message for remote validation

2008-12-02 Thread BH
Hello, I'm using the jQuery Validation plugin (which is awesome by the way). I need to dynamically add a validation rule, so I use the rules("add", rules) method. I set it up to do remote validation, which works, but I want to display a custom message, not the default "Please fix this field." mes