This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.validator.addMethod("notEqualToGroup", function (value, element, options) { | |
// get all the elements passed here with the same class | |
var elems = $(element).parents('form').find(options[0]); | |
// the value of the current element | |
var valueToCompare = value; | |
// count | |
var matchesFound = 0; | |
// loop each element and compare its value with the current value | |
// and increase the count every time we find one | |
jQuery.each(elems, function () { |