JSFiddle - React, Tailwind, and code Playground HTML <input type="text" id="txtFld" onblur="if(!Number(this.value)){alert('not a number');}" />