http://docs.jquery.com/Plugins/Validation
function validateP(){
var validator = $("#form1").validate({
rules: {
Rname :"required",
Rroom: {
required: true,
number: true
},
Rsize: {
required: true,
number: true
},
Rnotes: "required"
},
errorLabelContainer: "#errorlable",
messages: {
Rname :" Enter Rack name ",
Rroom: "Enter Room Number ",
Rsize: "Enter number of servers in rack",
Rnotes: "Enter additional notes "
}
});
if ($('#form1').valid())
$('#form1').submit();
}
No comments:
Post a Comment