/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


$.validator.addMethod("valueNotEquals", function (value, element, arg) {
    return arg !== value;
}, "Elige una opción");

$.validator.addMethod("math", function (value, element, params) {
    console.log(value + "-" + element + "-" + params);
    return this.optional(element) || value == params;
}, "Activa la casilla.");

// validate signup form on keyup and submit
$("#formulario-alumno-licenciatura").validate({
    rules: {
        apePat: "required",
        nomAlu: "required",
        curp: "required",
        sexAlu: {valueNotEquals: "default"},
        telefonoCelular: "required",
        email: "required",
        fecIng: "required",
        fecEgr: "required",
        mesCol: "required",
        cveEsc: {valueNotEquals: "default"},
        modalidad: {valueNotEquals: "default"},
        cveCar: {valueNotEquals: "default"}
    },
    messages: {
        apePat: "Campo obligatorio.",
        nomAlu: "Campo obligatorio.",
        curp: "Campo obligatorio.",
        sexAlu: {valueNotEquals: "Campo obligatorio."},
        telefonoCelular: "Campo obligatorio.",
        email: "Campo obligatorio.",
        fecIng: "Campo obligatorio.",
        fecEgr: "Campo obligatorio.",
        mesCol: "Campo obligatorio.",
        cveEsc: {valueNotEquals: "Campo obligatorio."},
        modalidad: {valueNotEquals: "Campo obligatorio."},
        cveCar: {valueNotEquals: "Campo obligatorio."}
    }
});