Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#nueva-orden')
- .formValidation({
- framework: 'bootstrap',
- fields: {
- tOrden: {
- validators: {
- notEmpty: {
- message: 'Se requiere de un tipo de orden.'
- }
- }
- },
- jAsignado: {
- validators: {
- notEmpty: {
- message: 'Se requiere asignar un jefe de mantenimiento.'
- }
- }
- },
- nMatricula: {
- validators: {
- notEmpty: {
- message: 'Se requiere de un número de matricula.'
- },
- stringLength: {
- min: 7,
- message: 'No parece ser un número de matricula.'
- }
- }
- },
- motivo: {
- validators: {
- notEmpty: {
- message: 'Motivo por el cual se creara la orden.'
- },
- stringLength: {
- min: 20,
- max: 200,
- message: 'Minimo 20 caracteres, Máximo 200.'
- }
- }
- },
- pMaximo: {
- validators: {
- notEmpty: {
- message: 'Plazo máximo para la entrega de la orden.'
- },
- date: {
- format: 'DD/MM/YYYY',
- message: 'La fecha no tiene un formato valido.'
- }
- }
- }
- }
- })
- .on('success.form.fv', function(e){
- e.preventDefault();
- var $form = $(e.target);
- var fv = $form.data('formValidation');
- // aquí va la alerta.
- // Cuando se confirme se debe ejecutar fv.defaultSubmit();
- });
Advertisement
Add Comment
Please, Sign In to add comment