PakDataKit - v2.2.0
    Preparing search index...

    Function formatCNICInput

    • Formats a CNIC as the user types: 35202-1234567-1.

      Keeps up to 13 digits (Urdu digits are converted) and inserts the dashes as the groups fill. Other characters are dropped.

      Parameters

      • value: string

        Current input value

      Returns string

      Value to show in the input