---
id: "thidcard"
kind: "datatype"
status: "stable"
is_pii: true
categories: ["pii", "persons"]
country: ["TH"]
langs: ["th"]
quality: 65
url: "http://registry.apicrafter.io/datatype/thidcard"
---

# Thai identity card (`thidcard`)

Number of the Thai identity card

- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Person related (persons)
- Countries: Thailand (TH)
- Languages: Thai (th)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^\b\d{1}-\d{4}-\d{5}-\d{2}-\d\b$
```

## Mappings

- dpv: `pd:OfficialID`
- presidio: `TH_TNIN`
- purview: `Thai population identification code`
- stdnum: `th.pin`

## Metacrafter rules

4 rules: 2 match the field name, 2 match values.

- `thidcardfield` (field, `pii/th/th_pii.yaml`)
- `thidcardvalue` (data, `pii/th/th_pii.yaml`)
- `th_persons_thidcardfield` (field, `th/th_persons.yaml`)
- `th_persons_thidcardvalue` (data, `th/th_persons.yaml`)

## Supported by tools

- `awsglue`
- `azureailanguage`
- `metacrafter`
- `microsoftpurview`
- `nightfall`
- `presidio`
- `pythonstdnum`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Thai_identity_card>

## Quality

Score 65/100. Missing: longer description, examples, negative example, translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/thidcard.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/TH/persons/thidcard.yaml>
