# validateCNIC

Source: https://pakdatakit.dev/api/typescript/cnic/functions/validatecnic/

```ts
function validateCNIC(cnic): boolean;
```

Defined in: [cnic.ts:21](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/cnic.ts#L21)

Validates a Pakistani CNIC number.

Accepts `3520212345671`, `35202-1234567-1`, `35202 1234567 1` and Urdu digits.
Separators must sit between the 5-7-1 digit groups and be used consistently.

NADRA does not publish a check-digit algorithm, so this validates structure only.

## Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `cnic` | `string` | The CNIC string to validate |

## Returns

`boolean`

`true` if the CNIC is valid, otherwise `false`
