Click here to Skip to main content
15,903,748 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
The problem is that submit doesn't validate other tabs. If I remove hidden from excluded list it validates but the problem it also then validates hidden input boxes. How can i get it to validate all tabs not just active but also not validate hidden fields inside the tabs?

Here is some of the code from the validation section-.
JavaScript
jQuery('#form').bootstrapValidator({
    container: '#messages',
    excluded: [':disabled'],
    feedbackIcons: {
        valid: 'glyphicon glyphicon-ok',
        invalid: 'glyphicon glyphicon-remove',
        validating: 'glyphicon glyphicon-refresh'
    },
    fields: { 
            Name: {
                validators: {                       
                    notEmpty: {
                        message: 'Name is required.'
                              }
                   }
              },
         EmployerName: {
             validators: {

                 notEmpty: {
                     message: 'Employer Name required.'
                 }
              },
         JobTitle: {
             validators: {

                 notEmpty: {
                     message: 'JobTitle required.'
                 }
              }...

Name field is on the active tab EmployerName & Job Title are in seperate tab to Name. Job Title is in a Div that is hidden.

When code runs Job Title is validated as well as Employer Name. Job Title shouldnt be as its hidden. If i include hidden in the excluded list, EmployerName doesnt validate anymore. Any help appreciated
Posted
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900