JSFiddle - React, Tailwind, and code Playground

HTML

<input pattern="[a-zA-Z0-9!@#$%^*_|]{6,25}" type="text"  />