1var $ = jQuery.noConflict(); 2$(document).ready(function(){ 3 var errorsList = ''; 4 $("#form_asociate").validate({ 5 onfocusout: false, 6 onkeyup: false, 7 onclick: false, 8 rules: { 9 nombre: {required: true}, 10 nombre_sociedad: {required: true}, 11 telefono: {required: true}, 12 correo: {required: true, email: true}, 13 interes: {required: true}, 14 }, 15 messages: { 16 nombre:{required: "Ingresa tu nombre."}, 17 nombre_sociedad:{required: "Ingresa el nombre de la sociedad."}, 18 telefono:{required: "Ingresa tu teléfono."}, 19 correo:{required: "Ingresa tu correo.", email: "La dirección de correo no es válida."}, 20 interes:{required: "Ingresa tu interes."}, 21 }, 22 submitHandler: function(form){ 23 $.getJSON( get_template_directory_uri + '/inc/backend_asociate.php', $(form).serialize()) 24 .done(function(data){ 25 if(data.response == 'true'){ 26 alertify.error(data.message); 27 } else { 28 alertify.success(data.message); 29 location.href = "/thank-you-asociar/"; 30 } 31 }) 32 .fail(function(data){ 33 alertify.error(data.message); 34 }); 35 }, 36 showErrors: function(errorMap, errorList) { 37 this.defaultShowErrors(); 38 $(errorList).each(function(){ 39 errorsList += $(this)[0].message + '<br/>'; 40 }); 41 if (errorsList){ 42 alertify.error(errorsList); 43 } 44 errorsList = ''; 45 } 46 }); 47 $("#form_asociate input[type='submit']").on('click',function(){ 48 var validator = $("#form_asociate").valid(); 49 if (!validator) { 50 alertify.error("Todos los campos son requeridos"); 51 } else { 52 $("#form_asociate").submit(); 53 } 54 return false; 55 }); 56});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.