jquery-wizard icon indicating copy to clipboard operation
jquery-wizard copied to clipboard

How to use jquery.validation plugin with this?

Open Kennersky opened this issue 6 years ago • 6 comments

How to use jquery.validation plugin with this?

Kennersky avatar Jan 18 '18 02:01 Kennersky

This is for Bootstrap4:

                onInit: function() {                                                                   
                    $("#your-form-id").formValidation({
                        framework: "bootstrap",
                        err: {
                            clazz: "invalid-feedback"
                        },
                        control: {
                            valid: "is-valid",
                            invalid: "is-invalid"
                        },
                        row: {
                            invalid: "has-danger"
                        },  
                        /*fields: {                                
                            name: {
                                validators: {
                                    notEmpty: {
                                        message: "Please enter your name"
                                    }
                                }
                            },                                
                        },*/
                    });
                    return true;
                },                  
                validator: function() {            
                    var fv = $('#your-form-id').data('formValidation');
                    var $this = $(this);
                    // Validate the container
                    fv.validateContainer($this);
                    var isValidStep = fv.isValidContainer($this);                        
                    if (isValidStep === false || isValidStep === null) {                           
                        return false;
                    }                        
                    return true;
                },

macgadger avatar Jan 29 '18 13:01 macgadger

Any update on this issue, @macgadger: You are not providing codes for jquery.validation plugin: https://jqueryvalidation.org/

plasebo avatar Jul 05 '18 12:07 plasebo

@plasebo I have already submitted the code above to use with bootstrap 4.

macgadger avatar Jul 05 '18 16:07 macgadger

This code require the form validation jquery plugin but does suit e the query validation plugin, I,ve posted in my previous comment. Have you tried this popular plugin?

plasebo avatar Jul 05 '18 16:07 plasebo

In fact, I,m implementing a bootstrap collapse panel into a wizard, the jquery wizard suit my needs but I require a form validation on each panel, restricting users to step to the next panel if errors exist in the current panel. I,m using jquery.validation js for the validation

plasebo avatar Jul 05 '18 16:07 plasebo

Anyway, as far as #8 isn't resolved, any form validation is useless.

mortezae avatar Dec 07 '19 17:12 mortezae