JSFiddle - React, Tailwind, and code Playground

by Vladimir Kutepov

HTML

<form>
  <input type="text" pattern="(?=(?:\D*\d){2}).{8,}" />
  <button>Send</button>
</form>