Jquery-validate - addMethod - how to apply custom rule referencing two text boxes?

Try the following: Create the Rule jQuery.validator. AddMethod("checkTotal",function(value) { total = parseFloat($('#LHSOPERAND').val()) + parseFloat($('#RHSOPERAND').val()); return total == parseFloat($('#TOTAL').val()); }, "Amounts do not add up! "); jQuery.validator.

ClassRuleSettings. CheckTotal = { checkTotal: true }; Input Init Validation $(document). Ready(function() { $("#TOTALSFORM").validate(); }); Fiddle here: http://jsfiddle.net/wTMv3.

Just what I wanted. Thanks very much. – southof40 Nov 25 at 11:27.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions