jQuery - If input has more or less that 10 characters inside
<p>I want to make a custom validation for an phone number input.<br></p>

<pre><code>var telVal = $("#telefon").val();
if(telVal == '') {
$("#telefon").addClass('eroare png');
hasError = true;
}
</code></pre>

<p>This gives me an error if user does not type anything in this input, but I want to check if user types 10 characters. So, the script must be like</p>

<blockquote>
  <p>if(telVal has 9 characters or more
  than 10) { do this }</p>
</blockquote>

<p>Thank you!</p>
