The following code doesn't work.
$(document).ready(function(){
$("#digitalchange").validate(
{
rules: {
addbalance: {
digits:true,
min:20,
max:1000
},
addquota: {
digits:true,
min:5,
max:1000
}
},
submitHandler: function(){
var var1=$("#addbalance").val();
alert(var1);
}
messages: {
}
});
});
However, after I remove
submitHandler: function(){
var var1=$("#addbalance").val();
alert(var1);
}
, the remaining code works. What's wrong?