Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#form-crear').formValidation({
- framework: 'bootstrap',
- excluded: ':disabled',
- button: {
- selector: '#Guardar',
- disabled: 'disabled'
- },
- icon: {
- valid: 'glyphicon glyphicon-ok',
- invalid: 'glyphicon glyphicon-exclamation-sign',
- validating: 'glyphicon glyphicon-refresh'
- },
- fields: {
- CrearCedula: {
- validators: {
- notEmpty: {
- message: 'Campo requerido'
- },
- stringLength: {
- min: 5,
- max: 8,
- message: 'Introduzca un valor entre 5 a 8 dígitos de largo'
- },
- integer: {
- message: 'Solo se permite dígitos'
- },
- remote: {
- message: 'Ya esta registrado',
- url: "personas/comprobacion",
- type: "post",
- data: {
- valor: 'crear'
- },
- async: true
- }
- }
- },
- CrearNombres: {
- validators: {
- notEmpty: {
- message: 'Campo requerido'
- },
- stringLength: {
- min: 5,
- max: 50,
- message: 'Introduzca un valor entre 5 a 50 caracteres de largo'
- },
- regexp: {
- regexp: /^[a-zA-Zá-úÁ-Ú ñÑ]+$/,
- message: 'Solo se permite letras'
- }
- }
- },
- CrearApellidos: {
- validators: {
- notEmpty: {
- message: 'Campo requerido'
- },
- stringLength: {
- min: 5,
- max: 50,
- message: 'Introduzca un valor entre 5 a 50 caracteres de largo'
- },
- regexp: {
- regexp: /^[a-zA-Zá-úÁ-Ú ñÑ]+$/,
- message: 'Solo se permite letras'
- }
- }
- },
- AsignarCargo: {
- validators: {
- notEmpty: {
- message: 'Campo requerido'
- }
- }
- }
- }
- })
- .on('err.form.fv', function(e, data) {
- })
- .on('success.form.fv', function(e) {
- })
- .find('[name="AsignarCargo"]').combobox().end();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement