title: Validating generated number input with Bootstrap FormValidation
body: <p>I've been struggling to get this field validation to work. I'm using the JS validation for bootstrap from <a href="http://formvalidation.io/" rel="nofollow">http://formvalidation.io/</a> and I've examined <a href="http://formvalidation.io/settings/" rel="nofollow">http://formvalidation.io/settings/</a> but nothing I've tried is working. </p>
  
  <p><strong>The field needs to validate a number input on a dynamically generated field using Razer C#, and the form is built to submit multiple models, therefore my name attribute is <code>values[@i].Rating</code> for each element that is generated, where <code>i</code> is an integer that is incremented in a loop.</strong> </p>
  
  <p>The validation must make sure the client enters a number between 1 and 4 (inclusive), and if it is not a number between 1 and 4, it must show an error message such as "Please enter a number between 1 and 4". Here is my code, I first tried it with HTML attributes:</p>
  
  <pre><code>&lt;input style="text-align: center" type="number" data-fv-between-min="1" data-fv-between-max="4" data-fv-between-inclusive="true" data-fv-between-message="Please enter a rating between 1 and 4" name="values[@i].Rating" class="form-control" /&gt;
  </code></pre>
  
  <p>but this didn't work, so I tried the javascript route with:</p>
  
  <pre><code>$(document).ready(function () {
      $('#newTSRForm').formValidation({
          framework: 'bootstrap',
          fields: {
              selector: '[type="number"]',
              input: {
                  validators: {
                      between: {
                          min: 1,
                          max: 4,
                          message: 'Please enter a value between 1 and 4'
                      }
                  }
              }
          }
      })
  });
  </code></pre>
  
  <p>but my syntax is probably wrong or my thinking is incorrect. I also tried</p>
  
  <pre><code>$(document).ready(function () {
      $('#newTSRForm').formValidation({
          framework: 'bootstrap',
          fields: {
              'values[]': {
                  validators: {
                      between: {
                          min: 1,
                          max: 4,
                          message: 'Please enter a value between 1 and 4'
                      }
                  }
              }
          }
      })
  });
  </code></pre>
  
  <p>But this doesn't work either. I have made sure my set up is correct so the problem is simply syntax or plausability. Can anybody advise?</p>