Getting started with PK Validate
Lightweight format validation for Pakistani identifiers and mobile numbers.
Format validators for Pakistani data
PK Validate is a zero-dependency TypeScript utility for checking and formatting Pakistani CNIC, mobile number, NTN, postal code, and IBAN inputs.
The package groups helpers by value type: cnic, phone, ntn, postalCode, and iban. Most modules expose isValid; supported modules also expose normalization, formatting, masking, or bank-code helpers.
It is intended for structural validation in forms and browser applications. It does not confirm identity, registration, account existence, ownership, or whether a number can be reached.
Use synthetic examples in logs and tests. CNICs are sensitive personal data; mask values before displaying them when possible.