title: How do I validate Mobile no. in Bootstrap 4 using constraint validation?
body: <p>Here is the code that I have used to create a form.
  Basically, I need to validate mobile number on the clients'-side using constraint validation. Also, the error message should be displayed at the time the user inputs data.
  I have used mdboostrap.
  The <code>oninput="check(this)"</code> calls the function.
  I need the no. of digits to be equal to 10.
  Here's a codepen for editing .</p>
  
  <p><a href="https://codepen.io/aditya-jangid/pen/PxwNRV" rel="nofollow noreferrer">https://codepen.io/aditya-jangid/pen/PxwNRV</a>.</p>
  
  <pre><code>function check(input) {
  
      }
  </code></pre>
  
  <p>I need to write the function as above.</p>