JQuery Validate selector issues
Like we discussed, this is a solution:
-
highlight: function(element, errorClass){
$(element).removeClass(errorClass);
$(element).parent().siblings(".inputrightdiv").removeClass("inputrightdiv-valid").addClass("inputrightdiv-error");
},
unhighlight: function(element, errorClass){
$(element).parent().siblings(".inputrightdiv").removeClass("inputrightdiv-error").addClass("inputrightdiv-valid");
},
// Focus in textbox
focusInvalid: false, // show all form error at a time
submitHandler: function() {
alert("submitted!");
},
// set this class to error-labels to indicate valid
success: function(element) {
$(element).parent().siblings(".inputrightdiv").addClass("inputrightdiv-valid");
}
errorElement is the HTML tag where the error message is placed in.
In your code, you'll create <div.inputrightdiv>-tags...