Module guides
Each guide explains what a module checks or calculates, what it returns and where its data comes from. Every guide has a live example that runs in your browser, and the same examples in all five languages, checked against every port on each build.
Identity
Section titled “Identity”CNICValidate Pakistani CNIC numbers and read the province of registration and gender they encode. A format check, not NADRA verification.
PassportCheck that a Pakistani passport number has the common shape of two letters and seven digits. A format check, not DGIP verification.
Vehicle platesSplit a Pakistani vehicle registration number into series letters, number and optional year, and check its common shape.
PhoneValidate Pakistani mobile numbers, format them as E.164, and find the network a number was first issued on.
Mobile networksFind the mobile operator a Pakistani 03XX prefix was originally allocated to (Jazz, Zong, Ufone, Telenor or SCO).
Landlines and special numbersIdentify and format any Pakistani phone number (mobile, landline, UAN, toll-free, premium or personal) and look up landline area codes.
WhatsApp linksCreate a wa.me click-to-chat link for a Pakistani mobile number, with an optional pre-filled message.
Banking and payments
Section titled “Banking and payments”IBAN and banksValidate Pakistani IBANs with the mod-97 checksum and look up the bank, its type and status from the bank code.
Raast QRCreate, read and check Raast payment QR codes following the State Bank of Pakistan's QR standard.
Electricity and gas billsCheck Pakistani electricity bill reference numbers, customer IDs, K-Electric account numbers and SNGPL or SSGC gas consumer numbers.
Numbers in wordsWrite numbers and rupee amounts in words with lakh and crore, in English or Urdu, including cheque style (“Rupees … Only”).
Rupee formattingFormat amounts as Pakistani rupees (Rs. 150,000) or in lakh and crore (25 Lakh, 1.25 Crore).
Reading amountsRead rupee amounts as people type them in Pakistan, like 1,50,000, Rs. 5,000/-, 1.5 lakh, 2.25 crore or Urdu digits, exactly to the paisa.
Tax and FBR
Section titled “Tax and FBR”Sales taxSales tax rates for goods (FBR) and services (PRA, SRB, KPRA, BRA, ICT) on any date since July 2019, with the law behind each rate and exact paisa amounts.
Income tax on salaryIncome tax on salary from the salaried rate table of the Income Tax Ordinance 2001, tax years 2020 to 2027, exact to the paisa.
NTN and STRNCheck the format of Pakistani National Tax Numbers (NTN) and Sales Tax Registration Numbers (STRN). A format check, not FBR verification.
FBR digital invoicingBuild FBR Digital Invoicing JSON with the sales tax worked out, and check it offline against PRAL's DI API v1.12 rules, with FBR's error codes.
Geography and postal
Section titled “Geography and postal”Postal codes and post officesPostal codes of Pakistani cities and every delivery post office in Pakistan Post's directory, including villages.
Provinces, districts and tehsilsPakistan's provinces, divisions, districts and tehsils offline: the province of a city or district, and the 2023 census divisions and tehsils.
AddressesParse free-form Pakistani addresses into street, area, city, district, province and postal code, flag a city in the wrong province, and format them.
Delivery and COD
Section titled “Delivery and COD”COD address and phone checksScore how complete a Pakistani delivery address is and flag phone numbers a courier cannot reach, for cash on delivery orders.
Courier (experimental)Experimental. Map a Pakistani courier's own delivery status to one shared vocabulary, and normalise how a city is written for courier forms.
Text and dates
Section titled “Text and dates”Urdu and textURL slugs that keep Urdu letters, Urdu alphabetical sorting, right-to-left checks, Urdu and English digits, and Roman Urdu spelling clean-up.
Hijri datesConvert between Gregorian and Hijri (Islamic) dates with the tabular calendar, name Hijri months and check for Ramadan, with a day offset for moon sighting.
Public holidaysPakistan's federal public holidays for any year from 1948, with Eid and Ashura dates as observed in 2020–2026 and estimated after that.
As-you-type inputFormat CNIC, mobile number and IBAN fields while the user types, and tell a half-typed value apart from a wrong one.
Form kits and adaptersReady-made CNIC, mobile and IBAN inputs and checkout and KYC forms for React, Vue, Angular and Flutter, plus Zod, Yup, Joi and other schema adapters.
Every function and type is in the TypeScript API reference.