I have a form where a user can keep adding items to a list. When they go to submit this page, I want to validate that this list actually has items in it (not the individual
I've found a solution in the source code:
return $( this.currentForm )
.find( "input, select, textarea, [contenteditable]" )
So jquery-validation takes only these types of elements.. I simply added the attribute "contenteditable" to the element I want to validate and added a custom validator.
$.validator.addMethod("raty-required", function (value, element, regexpr) {
return $(element).raty("score") >= 0;
}, "Bitte Bewertung abgegeben");