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
            }
        }
    });
}
View Code

1.jquery validate是根据name来验证的

posted @ 2015-09-30 10:38  Aaronqcd  阅读(111)  评论(0编辑  收藏  举报