jQuery.validator.addMethod(
“notEqualTo”,
function (value, element, param) {
return this.optional(element) || value != param.val();
},
“Please specify a different value”
);
“notEqualTo”,
function (value, element, param) {
return this.optional(element) || value != param.val();
},
“Please specify a different value”
);
and:
…
rules: {
oneCity: {
notEqualTo: $(‘#anotherCityId)’)
},
anotherCity: {
notEqualTo: $(‘#oneCityId’)
}
},
rules: {
oneCity: {
notEqualTo: $(‘#anotherCityId)’)
},
anotherCity: {
notEqualTo: $(‘#oneCityId’)
}
},
댓글 없음:
댓글 쓰기