$("#addForm").validate({
rules:
{
txtClass: {
required: true
},
txtSmall:
{
required: true,
number: true
},
txtBig:
{
required: true,
number: true
}
},
errorElement: "div",
errorPlacement: function (error, element) {
error.addClass('help-block');
element.after(error);
}
});
$("#addForm").validate({
rules:
{
txtClass: {
required: true
},
txtSmall:
{
required: true,
number: true
},
txtBig:
{
required: true,
number: true
}
},
messages:{
txtClass:"txtClass不能为空",
txtSmall:{
required:"txtSmall不能为空",
email:"txtSmall不正确"
},
txtBig:{
required:"txtBig不能为空",
email:"txtBig不正确"
}
}
errorElement: "div",
errorPlacement: function (error, element) {
error.addClass('help-block');
element.after(error);
}
});