title: jQuery - on text change while user typing or paste
body: <p>I'm new to jQuery and I've tried to make something but I failed so here is my problem
  when the user type it works but when the user paste something didn't work !! </p>
  
  <pre><code>$(document).ready(function(){
  
          $('#username').keyup(username_check);
  });
  </code></pre>
  
  <p>the username_check function :</p>
  
  <pre><code>function username_check(){  
  var username = $('#username').val();
  if(username == "" || username.length &lt; 4){
  alert("error");
  }
  </code></pre>
  
  <p>the field : </p>
  
  <pre><code>&lt;input type="text" id="username" name="username" required&gt;
  </code></pre>