JSFiddle - React, Tailwind, and code Playground

by FishBasketGordo

HTML

<input id="txt" /><br/>
<span id="info"></span>

JavaScript

$('input:text').blur(function() {

    if (!$(this).val().match(/^\d+$/)) {
        $('#info').text('Not a number...');
    } else {
        $('#info').text('A number...');
    }

});