Skip to content

pk (Superstruct adapter)

const pk: object;

Defined in: adapters/superstruct.ts:23

Superstruct structs for Pakistani identifiers.

Name Type
cnic() (options) => Struct<string, null>
phone() (options) => Struct<string, null>
iban() (options) => Struct<string, null>
ntn() (options) => Struct<string, null>
strn() (options) => Struct<string, null>
landline() (options) => Struct<string, null>
passport() (options) => Struct<string, null>
vehiclePlate() (options) => Struct<string, null>
codPhone() (options) => Struct<string, null>
amount() (options) => Struct<string, null>
import { object, optional } from 'superstruct';
import { pk } from 'pakdatakit/superstruct';
const form = object({ cnic: pk.cnic(), phone: optional(pk.phone()) });