jquery-wizard
jquery-wizard copied to clipboard
How to use jquery.validation plugin with this?
How to use jquery.validation plugin with this?
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;
},
Any update on this issue, @macgadger: You are not providing codes for jquery.validation plugin: https://jqueryvalidation.org/
@plasebo I have already submitted the code above to use with bootstrap 4.
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?
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
Anyway, as far as #8 isn't resolved, any form validation is useless.