Form jqueryvalidation validate
Hello
I use from jqueryvalidation.org the part demo/multipart. All is working fine but at least I don't know how I can include in the validation I used before. In my form before i added a onsubmit function. With the step by step form the validation with onsubmit will be to late. I need to validate in the first step two fileds (KRegSumme and KRate).
how can I include in the multipart demo code like this:
- function myvalidate()
- {
-
- var a = document.forms[0].KRegSumme.value;
- var b = document.forms[0].KRate.value;
-
- var r = parseFloat(a);
- var m = parseFloat(b);
-
- if (r > 100*m)
- {
- document.getElementById('error').style.display = 'block';
- document.getElementById('error').innerHTML = 'La quota mensile deve essere uguale o superiore all 1% del totale dell´importo richiesto!';
-
- return false;
- }
-
- if (m > r/2)
- {
- document.getElementById('error').style.display = 'block';
- document.getElementById('error').innerHTML = 'La quota mensile non potrá essere superiore al 50% dell´importo richiesto!';
-
- return false;
- }
- }