title: bootstrap validator date range using variables
body: <p>I am trying to validate a <code>date range</code> using <a href="http://formvalidation.io/" rel="nofollow">bootstrap validator</a>.
  The problem is that I need to specify the <code>min</code> and <code>max</code> condition dynamically using variables.</p>
  
  <p>Here's what I did but failed. Not sure how to use variables to specify the ranges in bootstrap validator?</p>
  
  <pre><code>&lt;?php
  $min_date = "2014-02-01";
  $max_date = "2014-02-28";
  ?&gt;
  
  &lt;script&gt;
  jQuery(document).ready(function($) {
  
  var min_date = '&lt;?php echo $min_date; ?&gt;'; &lt;-- This works! Thank you Dennis!
  var max_date = '&lt;?php echo $max_date; ?&gt;'; &lt;-- This works! Thank you Dennis!
  
  $('#form')
  
   .bootstrapValidator({
              feedbackIcons: {
                  validating: 'glyphicon glyphicon-refresh'
              },
              fields: {
                  'date': {
                      validators: {
                          notEmpty: {
                              message: 'Required'
                          },
                          date: {
                              message: 'The date is not valid',
                              format: 'YYYY-MM-DD',
                              min: min_date,         &lt;-- this does not work
                              max: max_date          &lt;-- this does not work
                              //min: '2014-02-01',   &lt;-- this works
                              //max: '2014-02-28'    &lt;-- this works
                          }
                      }
                  }
  });
  &lt;/script&gt;
  </code></pre>