title: How to set data-min of input and set message if value is less than min value
body: <p>I'm trying to set min valu of an input, but message doesn't show. How to show this message if input is required and it's entered less value than min value. 
  My code is:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(".mydiv :input").each(function () {
     var min = $(this).attr('datamin');
     if(min !== undefined &amp;&amp; min !== null &amp;&amp; min !== false) {
     if(value &lt; min) {
        valid = false;
        $(this).addClass('error');
        $(this).closest('label').addClass('red');
        $(this).closest('label').html('Required min value:' + min);
     } else {
        $(this).removeClass('error');
        $(this).closest('label').removeClass('red');
     }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;input datamin='1' class="required" name="order"/&gt;
   &lt;label for="order"&gt;&lt;?php echo __('order'); ?&gt;&lt;span class="red"&gt;*&lt;/span&gt;&lt;span class="min_value" style="display:none"&gt;&lt;/span&gt;&lt;/label&gt;</code></pre>
  </div>
  </div>
  </p>