Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. $('#form-crear').formValidation({
  2. framework: 'bootstrap',
  3. excluded: ':disabled',
  4. button: {
  5. selector: '#Guardar',
  6. disabled: 'disabled'
  7. },
  8. icon: {
  9. valid: 'glyphicon glyphicon-ok',
  10. invalid: 'glyphicon glyphicon-exclamation-sign',
  11. validating: 'glyphicon glyphicon-refresh'
  12. },
  13. fields: {
  14. CrearCedula: {
  15. validators: {
  16. notEmpty: {
  17. message: 'Campo requerido'
  18. },
  19. stringLength: {
  20. min: 5,
  21. max: 8,
  22. message: 'Introduzca un valor entre 5 a 8 dígitos de largo'
  23. },
  24. integer: {
  25. message: 'Solo se permite dígitos'
  26. },
  27. remote: {
  28. message: 'Ya esta registrado',
  29. url: "personas/comprobacion",
  30. type: "post",
  31. data: {
  32. valor: 'crear'
  33. },
  34. async: true
  35. }
  36. }
  37. },
  38. CrearNombres: {
  39. validators: {
  40. notEmpty: {
  41. message: 'Campo requerido'
  42. },
  43. stringLength: {
  44. min: 5,
  45. max: 50,
  46. message: 'Introduzca un valor entre 5 a 50 caracteres de largo'
  47. },
  48. regexp: {
  49. regexp: /^[a-zA-Zá-úÁ-Ú ñÑ]+$/,
  50. message: 'Solo se permite letras'
  51. }
  52. }
  53. },
  54. CrearApellidos: {
  55. validators: {
  56. notEmpty: {
  57. message: 'Campo requerido'
  58. },
  59. stringLength: {
  60. min: 5,
  61. max: 50,
  62. message: 'Introduzca un valor entre 5 a 50 caracteres de largo'
  63. },
  64. regexp: {
  65. regexp: /^[a-zA-Zá-úÁ-Ú ñÑ]+$/,
  66. message: 'Solo se permite letras'
  67. }
  68. }
  69. },
  70. AsignarCargo: {
  71. validators: {
  72. notEmpty: {
  73. message: 'Campo requerido'
  74. }
  75. }
  76. }
  77. }
  78. })
  79. .on('err.form.fv', function(e, data) {
  80. })
  81. .on('success.form.fv', function(e) {
  82. })
  83. .find('[name="AsignarCargo"]').combobox().end();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement