JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<form>
<input type="text" maxlength="11" pattern="\-?\d+\.?\d+" />
<input type="submit" value="Submit" />
</form>
</body>
<body>
<form>
<input type="text" maxlength="11" pattern="\-?\d+\.?\d+" />
<input type="submit" value="Submit" />
</form>
</body>