Skip to content

Form inputs playground

Runs in your browser: nothing you type is uploaded or stored.

CNIC

Dashes are added for you. Try starting with 0.

Empty

Mobile number

Local or +92. Try 0360 (not allocated).

Empty

IBAN

Grouped in fours and uppercased as you type.

Empty

Why this matters

  • No early errors. A half-typed CNIC is “incomplete”, not “invalid”, so users aren’t told off mid-way.
  • Instant real errors. A CNIC starting with 0, a mobile prefix no operator uses, or a non-PK IBAN is flagged straight away.
  • Cursor stays put. Editing in the middle or deleting a dash keeps the caret where you expect.
Usage
import { CNICInput, PhoneInput, IBANInput } from "pakdatakit-react";

<CNICInput
  onValueChange={(value, state, info) => {
    // value: ""
    // state: "empty"
  }}
  aria-describedby="cnic-help"
/>

// Not using React? The same helpers are in pakdatakit:
import { formatCNICInput, checkCNICInput } from "pakdatakit/input";