Advertisement
Guest User

Untitled

a guest
Jul 28th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. jQuery(document).ready(function () {
  2.  
  3. jQuery("#registrarse").validate({
  4.  
  5. errorClass: "msg_contacto",
  6. onkeyup: false,
  7. rules: {
  8. im_Nombre: {
  9. required: true,
  10. minlength: 3
  11. },
  12. im_Email: {
  13. required: true,
  14. email: true
  15. },
  16. im_cEmail: {
  17. required: true,
  18. email: true,
  19. equalTo: "#registrarse #im_Email"
  20. },
  21. im_Telefono: {
  22. required: true
  23. }
  24. },
  25. messages: {
  26. im_Nombre: {
  27. required: 'Campo Requerido',
  28. minlength: 'Su nombre debe tener al menos 3 caracteres'
  29. },
  30. im_Email: {
  31. required: 'Campo Requerido',
  32. email: 'E-mail inválido',
  33. },
  34. im_cEmail: {
  35. required: 'Campo Requerido',
  36. email: 'E-mail inválido',
  37. equalTo: 'Confirme correctamente su E-mail'
  38. },
  39. im_Telefono: {
  40. required: 'Campo Requerido'
  41. }
  42. },
  43. errorPlacement: function (error, element) {
  44.  
  45. error.appendTo(element.nextAll("span.mensaje"));
  46. }
  47.  
  48. });
  49.  
  50. });
  51.  
  52. Here is the link to jsfiddle:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement