JSFiddle - React, Tailwind, and code Playground

by techiedelight

HTML

<label for="salary">Enter your salary:</label>
<input type="text" id="salary" name="salary" pattern="[0-9]+">

CSS

input:invalid {
  border: 3px solid red;
}