# pk

Source: https://pakdatakit.dev/api/typescript/adapters/class-validator/variables/pk/

```ts
const pk: object;
```

Defined in: [adapters/class-validator.ts:45](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/adapters/class-validator.ts#L45)

class-validator decorators for Pakistani identifiers. They work in NestJS
DTOs with the built-in `ValidationPipe`; no NestJS package is needed.
Combine with `@IsOptional()` for optional fields.

## Type Declaration

| Name | Type |
| :------ | :------ |
| <a id="property-cnic"></a> `cnic()` | (`options`) => `PropertyDecorator` |
| <a id="property-phone"></a> `phone()` | (`options`) => `PropertyDecorator` |
| <a id="property-iban"></a> `iban()` | (`options`) => `PropertyDecorator` |
| <a id="property-ntn"></a> `ntn()` | (`options`) => `PropertyDecorator` |
| <a id="property-strn"></a> `strn()` | (`options`) => `PropertyDecorator` |
| <a id="property-landline"></a> `landline()` | (`options`) => `PropertyDecorator` |
| <a id="property-passport"></a> `passport()` | (`options`) => `PropertyDecorator` |
| <a id="property-vehicleplate"></a> `vehiclePlate()` | (`options`) => `PropertyDecorator` |
| <a id="property-codphone"></a> `codPhone()` | (`options`) => `PropertyDecorator` |
| <a id="property-amount"></a> `amount()` | (`options`) => `PropertyDecorator` |

## Example

```ts

class CreateCustomerDto {
  @IsCNIC()
  cnic!: string;

  @IsOptional()
  @IsPakPhone({ message: 'Enter a Pakistani mobile number' })
  phone?: string;
}
```
