I have a textbox who has class "payment". This textbox is of number type. Below is HTML code for that:

```
<input type="number" id="payement-textbox" class="payment" min="0" max="100000" step="any" maxlength="9" value="" />

```

My requirement is that, if user enters any number less than 100 then an alert message will come up that you cannot enter an amount less than 100.

But problem is that, as soon as user start typing, it keep generating alert message without letting user write completely.
Below is the code for the same:

```
$(document).on("keyup paste",'input.payment', function(event) {
     var num = parseFloat($(this).val());
    if ( num < 100) {
         alert("you cannot enter an amount less than 100");
    } 
});

```

I learnt about clearTimeout. And I used it this way:

```
 $(document).on("keyup paste",'input.payment', function(event) {
            clearTimeout(typingTimer);
            typingTimer = setTimeout(function(){
             var num = parseFloat($(this).val());
                if ( num < 100) {
                     alert("you cannot enter an amount less than 100");
                } 
        , 3000);
}); 

```

But its not working. Any idea?