Open 1dnmr opened 8 years ago
Seems I found the solution:
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
$('#fm').isValid();
});
Thank you so much for this, it was driving me crazy!
I'm using it like this for wizard-style forms:
$('form a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
$(this).parents("form").isValid();
});
There does seem to be an issue with this when using the toggleDisabled
module though. If there are no validation errors on the last tab and your submit button is on there it will enable it even if you have allowed users to skip tabs which have errors on them. Just a heads up.
I decided put this question here. It might be useful for somebody else. I have bootstrap tabbed form.
I use function below to validate form after load data. But this code validate only current open tab.
I tried to use this to validate on tab change, but this code also not work
Can you please suggest solution how I can validate tabbed boostrap form on tab change?
Many thanks!