/* 
 * 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-doctorado").validate({
    rules: {
        apePat: "required",
        nomAlu: "required",
        curp: "required",
        sexAlu: {valueNotEquals: "default"},
        telefonoCelular: "required",
        email: "required",
        fecIng: "required",
        mesCol: "required",
        cveApo: {valueNotEquals: "default"},
        turno: {valueNotEquals: "default"},
        cveEsc: {valueNotEquals: "default"},
        modalidad: {valueNotEquals: "default"},
        staAlu: {valueNotEquals: "default"},
        cveCar: {valueNotEquals: "default"},
        costoInscripcion: "required",
        colegiatura: "required",
        costoReinscripcion: "required",
        horario: {step: false,required: true},
        horarioSalida: {step: false,required: true},
        dias: "required"
    },
    messages: {
        apePat: "Campo obligatorio.",
        nomAlu: "Campo obligatorio.",
        curp: "Campo obligatorio.",
        sexAlu: {valueNotEquals: "Campo obligatorio."},
        telefonoCelular: "Campo obligatorio.",
        email: "Campo obligatorio.",
        fecIng: "Campo obligatorio.",
        mesCol: "Campo obligatorio.",
        cveApo: {valueNotEquals: "Campo obligatorio."},
        turno: {valueNotEquals: "Campo obligatorio."},
        cveEsc: {valueNotEquals: "Campo obligatorio."},
        modalidad: {valueNotEquals: "Campo obligatorio."},
        staAlu: {valueNotEquals: "Campo obligatorio."},
        cveCar: {valueNotEquals: "Campo obligatorio."},
        costoInscripcion: "Campo obligatorio.",
        colegiatura: "Campo obligatorio.",
        costoReinscripcion: "Campo obligatorio.",        
        horario: {step: "Campo obligatorio.",required: "Campo obligatorio."},
        horarioSalida: {step: "Campo obligatorio.",required: "Campo obligatorio."},
        dias: "Campo obligatorio."
    }
});