title: Is there invalid state of Input range?
body: <p>I need to define custom HTML5 form validation styles in my application's design system like <a href="https://getbootstrap.com/docs/4.1/components/forms/#server-side" rel="nofollow noreferrer">Bootstrap</a>. But I don’t know how to apply <code>:invalid</code> state to an <code>&lt;input type="range"&gt;</code>.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>console.log($('#test').val());
  $('#test').val(50);
  console.log($('#test').val());</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.valid-message,
  .invalid-message {
    display: none;
  }
  
  .input:valid ~ .valid-message {
    display: block;
    color: green;
  }
  
  .input:invalid ~ .invalid-message {
    display: block;
    color: red;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="control"&gt;
    &lt;input type="range" class="input range" id="test" min="1" max="20"&gt;
    &lt;p class="valid-message"&gt;This is valid&lt;/p&gt;
    &lt;p class="invalid-message"&gt;This is invalid&lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is there invalid state of Input range? How can I reproduce that state?</p>