JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" class="actual" value="1">

JavaScript

var actual = $('.actual');

        actual.on('keypress', function() {
            console.log('test');
            
            var t = $(this);
            if (t.val() < 1) t.val('1');
            if (t.val() > 15) t.val('15');
        });