Created
October 26, 2016 20:07
-
-
Save johanmendezb/b2c90f996aca693aadfa175e4703c814 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function(e){function t(){var t=window.module.lp.form.data;var n=t.validationMessages;var r=t.validationRules;this.changeTitle=function(n){e(function(){e("#"+t.errorContainerId).find("div.error").text(n)})};this.changeField=function(e,t,i){if(!n[e])return;n[e].required=t;if(i&&r[e].email)n[e].email=i;if(i&&r[e].phone)n[e].phone=i}}window.errors=new t(lp.jQuery)})(lp.jQuery) | |
// Change the title bar of the validation error box | |
errors.changeTitle("Por favor soluciona estos problemas:"); | |
// Change the error text for specific fields. The first message is shown when nothing is | |
// entered and the second is shown when an invalid email/phone number is entered. | |
errors.changeField("nombre_y_apellido", "¡Ingresa tu nombre!"); | |
errors.changeField("correo_electronico", "¡Ingresa tu correo electrónico!", "¡El correo ingresado no es un correo valido!"); | |
errors.changeField("telefono", "¡Ingresa tu teléfono!", "¡El número ingresado no es un número de teléfono valido!"); | |
errors.changeField("politica_de_tratamiento", "¡Lee las políticas de tratamiento de datos personales y aceptalos!"); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment