Skip to content
Devix Open Source

The patterns nobody ships

CNIC, Emirates ID, UAE TRN, Saudi VAT, IBAN, cards and a MAC address — by name, with a token of your own where the built-in classes run out.

Live preview
<div class="demo demo--wide">
  <div class="demo-row">
    <div class="demo-seg" id="preset" role="group" aria-label="Pattern">
      <button type="button" data-preset="cnic" aria-pressed="true">CNIC</button>
      <button type="button" data-preset="emirates-id">Emirates ID</button>
      <button type="button" data-preset="uae-trn">UAE TRN</button>
      <button type="button" data-preset="saudi-vat">Saudi VAT</button>
      <button type="button" data-preset="iban">IBAN</button>
      <button type="button" data-preset="card">Card</button>
      <button type="button" data-preset="mac">MAC</button>
    </div>
  </div>

  <input class="demo-input" id="field" inputmode="numeric">

  <dl class="demo-kv" id="out"></dl>

  <p class="demo-hint">Switching the pattern keeps what is typed and regroups it — which is what a
    card field has to do the moment it works out the issuer. Every length here is the one
    <strong>Devix Validators</strong> checks, so the mask and the rule cannot disagree.</p>
</div>