I have been trying to get this working for longer than i probably should have, and after reading numerous SO threads on this, i still cant figure it out. Could someone please tell me what I am doing wrong.
I am trying to setup a dynamic rule in jquery validation
which will set an input text box minimum value = 1000 if my debitorder
check box is checked, but if both the debitorder
and my other checkbox
are checked, then the minimum value should be 500. below is my latest attempt of many, but i seem to just break the validation completely every time.
amount: {
required: "#debitorder:checked",
number: true,
minValue: function() {
if ($("#othercheckbox").is(":checked")) {
minimum: 500
} else {
minimum: 1000
}
}
},