Нашли способ сделать. Код на js:
$.validator.addMethod("minlenghtname", function (value, element) {
return /^[a-zа-я]+$/i.test(value);
}," does not match the format");
$.validator.addMethod("requiredname", function (value, element) {
return value.length > 2;
}," Fill this field !!!");
$.validator.addMethod("requirednum", function (value, element) {
return /^\d+$/i.test(value);
}," only numbers");
$.validator.addMethod("requiredemail", function (value, element) {
return /^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$/i.test(value);
}," Invalid email");
$.validator.addMethod("checkMask", function(value, element) {
return /\+\d{1}\(\d{3}\)\d{3}-\d{4}/g.test(value);
},"Invalid phone format (+9(999)999-9999)");
$.validator.addMethod("checkData", function(value, element) {
return value.match(/^\d\d?\.\d\d?\.\d\d\d\d$/);
},"Please enter a date in the format mm.dd.yyyy.");
$(function () {
$("#Phone").mask("+9(999)999-9999");
$("#date").mask("99.99.9999",{placeholder:"mm.dd.yyyy"});
var v = $("#commentForm").validate({
rules: {
fname: {
requiredname: true,
minlenghtname: true
},
lname: {
requiredname: true,
minlenghtname: true
},
num1:{
requirednum:true
},
num2: {
requirednum:true
},
city: {
minlenghtname: true
},
country:{
minlenghtname: true
},
email:{
requiredemail: true
},
Phone:{
checkMask: true
},
date:{
checkData: true
}
},
submitHandler: function() {
alert("Submitted, thanks!");
}
})
$(".next1").click(function() {
if (v.form()) {
$("#step2").show();
$("#step1").hide();
$("#progressText").html("Step 2 of 4");
}
});
$(".next2").click(function() {
if (v.form()) {
$("#step3").show();
$("#step2").hide();
$("#progressText").html("Step 3 of 4");
}
});
$(".next3").click(function() {
if (v.form()) {
$("#step4").show();
$("#step3").hide();
$("#progressText").html("Step 4 of 4");
}
});
});
Вот демонстрационная ссылка: многоступенчатая форма