title: Jquery formvalidation uncaught range error : maximum call stack size exceeded
body: <p>I am trying to use Jquery form validation. But i am getting the Uncaught range error : maximum call stack exceeded.i am using materialize css.</p>
  
  <blockquote>
    <p>this is the error i am getting</p>
  </blockquote>
  
  <pre><code>Uncaught RangeError: Maximum call stack size exceeded
  at RegExp.[Symbol.replace] (native)
  at String.replace (native)
  at Sizzle (http://localhost:3001/bower_components/jquery/dist/jquery.js:869:26)
  at Function.Sizzle.matches (http://localhost:3001/bower_components/jquery/dist/jquery.js:1405:9)
  at Function.jQuery.filter (http://localhost:3001/bower_components/jquery/dist/jquery.js:2769:15)
  at winnow (http://localhost:3001/bower_components/jquery/dist/jquery.js:2749:18)
  at jQuery.fn.init.is (http://localhost:3001/bower_components/jquery/dist/jquery.js:2807:12)
  at FormValidation.Framework.Bootstrap._getMessageContainer (http://localhost:3001/js/formValidation.min.js:10:13553)
  at FormValidation.Framework.Bootstrap._getMessageContainer (http://localhost:3001/js/formValidation.min.js:10:13639)
  at FormValidation.Framework.Bootstrap._getMessageContainer (http://localhost:3001/js/formValidation.min.js:10:13639)
  </code></pre>
  
  <blockquote>
    <p>This is my jquery and html code </p>
  </blockquote>
  
  <pre><code> &lt;form class="col s12 m8 l6" id="frontdesk-form-validation"&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="input-field col s12"&gt;
                          &lt;input id="first_name" name="name" type="text" class="validate"&gt;
                          &lt;label for="first_name"&gt;Name&lt;/label&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>
  
  
                  SUBMIT
              
  
  <pre><code>        &lt;/form&gt;
  function saveEnquiry() {
                      $('#frontdesk-form-validation').formValidation({
                              framework: 'bootstrap',
                              fields: {
                                  name: {
                                      validators: {
                                          notEmpty: {
                                              message: 'The name is required'
                                          }
                                      }
                                  },
                              }
                          })
                          .on('success.form.fv', function(e) {
                              e.preventDefault();
                              var name = $('#first_name').val();
                              var mobile = $('#tel1').val();
                              var email = $('#email').val();
                              var message = $('#message').val();
                              var description = $('#description').val();
                              var source = $('#source').val();
                              var assignedTo = $('#assigned').val();
                              $.ajax({
                                  type: "POST",
                                  url: '/enquiry/add',
                                  data: {
                                      name: name,
                                      mobile: mobile,
                                      email: email,
                                      message: message,
                                      description: description,
                                      source: source,
                                      assignedTo: assignedTo
                                  },
  
                                  success: function(data) {
                                      Materialize.toast('I am a toast!', 4000);
                                      return data;
                                  }
                              });
                          });
                  }
  </code></pre>
  
  <blockquote>
    <p>and this is the one more error iam getting</p>
  </blockquote>
  
  <pre><code>Uncaught TypeError: Cannot read property 'length' of undefined
  at FormValidation.Framework.Bootstrap.validateField (formValidation.min.js:10)
  at FormValidation.Framework.Bootstrap.validate (formValidation.min.js:10)
  at HTMLFormElement.&lt;anonymous&gt; (formValidation.min.js:10)
  at HTMLFormElement.dispatch (jquery.js:4737)
  at HTMLFormElement.elemData.handle (jquery.js:4549)
  </code></pre>
  
  <p>Please help me, Thanks in advance</p>