JSFiddle - React, Tailwind, and code Playground HTML <input type="text" required id="partNumber" pattern="^\([1-9]{2}\)[0-9]{4}\-[0-9]{4}$" />