title: simple sign up page using bootstrap and validating using Jquery and bootstrapvalidator , i want to call modal after validation success
body: <p>[Image 1<a href="https://i.stack.imgur.com/juRUZ.png" rel="nofollow noreferrer">][Image 2]</a>In my form, I have added some validation using jquery and bootstrap validator. After validation, I need to display success message on modal popup. My coding is as follow:
      `
      
      
      
      
      Bootstrap form Validation
      
      
      
      
      
      
      
      
      
          
          <h1> Bootstrap form Validation </h1>
          
          
              
                  
                       Full Name:
                      
                  
                  
                       Password 
                      
                  
                  
                       Confirm Password
                      
                  
                  
                       E-mail :
                      
                  
                  
                      Date of Birth 
                          
                              
                                  
                          
                  
                  
                       submit 
                  
                  
                    </p>
  
  <pre><code>                &lt;!-- Modal content--&gt;
                  &lt;div class="modal-content"&gt;
                    &lt;div class="modal-header"&gt;
                      &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                      &lt;h4 class="modal-title"&gt;Success&lt;/h4&gt;
                    &lt;/div&gt;
                    &lt;div class="modal-body"&gt;
                      &lt;p&gt;Some text in the modal.&lt;/p&gt;
                    &lt;/div&gt;
                    &lt;div class="modal-footer"&gt;
                      &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
  
                &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;/form&gt;
      &lt;/div&gt;
  &lt;script&gt;
      var successFlag = false;
      $(document).ready(function() {
          $('#dateOfBirth').datepicker({
                  format : 'mm/dd/yyyy',
          })
          .on('input change', function(e) {
              // Revalidate the date field
              // alert("selected date is :"+$(this).val());
             $('#validateform').bootstrapValidator('revalidateField', 'dob');
          });
          $('#validateform').bootstrapValidator({
              feedbackIcons:{
                  valid: 'glyphicon glyphicon-ok',
                  invalid: 'glyphicon glyphicon-remove',
                  validating: 'glyphicon glyphicon-refresh'
              },
              fields:{
                  full_name: {
                      validators: {
                          stringLength: {
                              //successFlag = false,
                              min: 5,
                              message: 'please enter your full name with minimum 5 letters length'
                          },
                          notEmpty: {
                              //successFlag = false,
                              message: 'please enter your full name'
                          }
                      }
                  },
                  password: {
                      validators: {
                          notEmpty: {
                              //successFlag = false,
                              message: 'enter your password'
                          }
                      }
                  },
                  confirmPassword:{
                      validators: {
                          notEmpty: {
                              //successFlag = false,
                              message: 'enter your password'
                          },
                          identical: {
                              //successFlag = false,
                              field: 'password',
                              message: ' enter similar password'
                          }
                      }
                  },
                  email: {
                      validators:{
                          notEmpty:{
                              //successFlag = false,
                              message:'please enter your email address'
                          },
                          emailAddress:{
                              //successFlag = false,
                              message:'please enter a valid email address'
                          }
                      }
                  },
                  dob: {
                      validators: {
                          notEmpty: {
                              //successFlag = false,
                              message: 'The date is required'
                          },
                          date: {
                              //successFlag = false,
                              format: 'MM/DD/YYYY',
                              message: 'The date is not a valid'
                          }
                      }   
                  },
              },
              onSuccess: function(e, data) {
                          //this section before submit
                          alert(successFlag);
                          successFlag = true;
                          alert(successFlag);
                          $('.modalMy').modal('show');
                      }
          })
      });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;'
  </code></pre>
  
  <p>And if any one know validation on age based on date of birth. i.e i should consider the age group between 14 and 50 if rest is given it should show error.</p>