I want to make an input field, where the user can insert only a number bigger than 200 and lower than 500. My problem is if I want to write for example "230" then the field doesn't allow me to, because it thinks I want to write "2".

```js
var t = false

$('.myinput').focus(function () {
    var $this = $(this)

    t = setInterval(

    function () {
        if (($this.val() < 200 || $this.val() > 500)) {
            if ($this.val() < 200) {
                $this.val(200)
            }

            if ($this.val() > 500) {
                $this.val(500)
            }
            $('.error').fadeIn(1000, function () {
                $(this).fadeOut(500)
            })
        }
    }, 50)
})

$('.myinput').blur(function () {
    if (t != false) {
        window.clearInterval(t)
        t = false;
    }
})
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input class="myinput" type="number" value="200" min="200" max="500">
<p class="error" style="display:none">Accepting Only values 200-500</p>
```