jquery validate详解
function validateField() { $('#registerForm').validate({ rules: { firstName: { required: true }, lastName: { required: true }, partyResponsible: { required: true }, employer: { required: true }, email: { required: true, email: true }, dateOfBirth: { date: true }, homePhone: { number: true }, insuranceCompany: { required: true }, insuranceNumber: { required: true }, insuranceValidDate: { required: true, date: true } } }); }
1.jquery validate是根据name来验证的