Closed GoogleCodeExporter closed 8 years ago
Is there any error in JS cosole?
Validation works fine in
http://jquery-datatables-editable.googlecode.com/svn/trunk/addingrecords.html
here is used 1.2.8. version. I have checked it in the FF, Chrome and IE.
Is it possible that you have some other script that override submit function
and sent request to the mypage.php?
Original comment by joc...@gmail.com
on 15 Jun 2011 at 11:54
you need to make sure you include jquery.validate.js in your page's header, and
you need to have a function like this:
$("#formAddNewRow").validate({
rules: {
input1: "required",
input2: "required",
},
onkeyup: false,
onclick: false,
messages: { },
invalidHandler: function(e, validator) {
var errors = validator.numberOfInvalids();
if (errors) {
var message = errors == 1
? 'You missed 1 field. It has been highlighted below'
: 'You missed ' + errors + ' fields. They have been highlighted below';
$("div.error span").html(message);
$("div.error").show();
} else {
$("div.error").hide();
}
}
});
Original comment by dmol...@gmail.com
on 16 Jun 2011 at 12:09
Original comment by joc...@gmail.com
on 15 Sep 2011 at 10:21
Original issue reported on code.google.com by
babali33...@gmail.com
on 15 Jun 2011 at 7:31