JSFiddle - React, Tailwind, and code Playground

HTML

<html>
<head>

</head>

<body>
<input type="text" id="textThing" />
<p id="p2">Paragraph 2</p>
</body>
</html>

JavaScript

$(document).ready(function(){
  $("#textThing").blur(function(){
    var isNumber = $(this).val().match(/^(100\.00|100\.0|100)|([0-9]{1,2}){0,1}(\.[0-9]{1,2}){0,1}$/);
      if(isNumber == null){
          var res = "not a number"
              }else{
              var res = "valid number";
              }
    $("#p2").html(res);
  });
});