PageSourceSearch

https://editorialjuris.com/js/newUser.js

js editorialjuris.com collected 2026-10-02 18:33:30 UTC 2,287 bytes, 87 lines download raw bytes

1
2// FORMULARIO REGISTRO USUARIO NUEVO PARA VISUALIZAR JURISPRUDENCIAS Y DOCTRINAS (registro.php) -----------------------
3$(function() {
4
5	// Validar el formulario de registro de usuario nuevo en JURISPRUDENCIAS Y DOCTRINAS --------------------------------
6  $('#newUser-form').validate({
7  	// Specify what the errors should look like when they are dynamically added to the form
8  	errorElement: "label",
9  	wrapper: "div",
10  	errorPlacement: function(error, element) {
11  		error.insertAfter(element);
12  		error.wrap("<div class='error-msg'></div>");
13  	},
14
15  	// Requerimientos para cada campo ------------------------------------------
16  	rules: {
17      nombre: {
18  			required: true,
19  			minlength: 3
20  		},
21      apellido: {
22  			required: true,
23  			minlength: 3
24  		},
25			telefono: {
26  			required: true,
27  			minlength: 3
28  		},
29  		email: {
30  			required: true,
31  			email: true
32  		},
33      documento: {
34  			required: true,
35  			minlength: 7
36  		},
37      direccion: {
38  			required: true
39  		},
40      passwd: {
41  			required: true
42  		}
43  	},
44
45  	// Especificar qué mensajes de errores mostrar -----------------------------
46  	messages: {
47      nombre: {
48  			required: "Ingrese su Nombre",
49  			minlength: jQuery.format("al menos 3 caracteres")
50  		},
51      apellido: {
52  			required: "Ingrese su apellido.",
53  			minlength: jQuery.format("al menos 3 caracteres.")
54  		},
55			telefono: {
56  			required: "Ingrese su tel&eacute;fono.",
57  			minlength: jQuery.format("Deben ser al menos 8 caracteres.")
58  		},
59  		email: {
60  			required: "Por favor ingrese su email.",
61  			email: "Verifique que el email sea v&aacute;lido."
62  		},
63      documento: {
64  			required: "Ingrese su n&uacute;mero de documento.",
65  			minlength: jQuery.format("al menos 6 caracteres.")
66  		},
67      direccion: {
68  			required: "Ingrese su Domicilio."
69  		},
70      passwd: {
71  			required: "Ingrese una contrase&ntilde;a"
72  		}
73  	},
74
75  	// Use Ajax to send everything to processForm.php
76  	submitHandler: function(form) {
77  		$("#sendNewuser").text("procesando...");
78  		$(form).ajaxSubmit({
79  			success: function(responseText, statusText, xhr, $form) {
80  				$(form).slideUp("fast");
81  				$("#response").html(responseText).show().slideDown("fast");
82  			}
83  		});
84  		return false;
85  	}
86  });
87});

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.