JSFiddle - React, Tailwind, and code Playground
by ChrisStanyon
HTML
<input type="text" id="myMoney">
<button id="click">Check</button>
JavaScript
$('#click').click(function(){
var money = new RegExp('^£?[0-9]*\.[0-9]{2}$');
if (money.test( $('#myMoney').val() )) {
alert("It's valid");
}
});